From nobody Mon Feb 9 02:39:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=yandex-team.ru Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1727878114398889.4631751855921; Wed, 2 Oct 2024 07:08:34 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5495316AD; Wed, 2 Oct 2024 10:08:33 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 04B96165D; Wed, 2 Oct 2024 10:07:01 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id C0CE99F2; Wed, 2 Oct 2024 10:06:52 -0400 (EDT) Received: from forwardcorp1a.mail.yandex.net (forwardcorp1a.mail.yandex.net [178.154.239.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id BF8B79E4 for ; Wed, 2 Oct 2024 10:06:51 -0400 (EDT) Received: from mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:2e8b:0:640:9795:0]) by forwardcorp1a.mail.yandex.net (Yandex) with ESMTPS id 6FC7160B9C; Wed, 2 Oct 2024 17:06:49 +0300 (MSK) Received: from vsementsov-lin.. (unknown [2a02:6b8:b081:8026::1:2f]) by mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id S6cR231IXeA0-DlNHdJfF; Wed, 02 Oct 2024 17:06:48 +0300 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1727878008; bh=mdEa2j58UIbdesA3CTO4zNSQT7yI9v8F+lGAJ+trbtM=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=RmXZxyEYY3tFDGkpe+nUYAJ/Va2sS8yZizOyFSF7Jk1jiwoYt02swn3LreTpEQAa1 BUfZBhqKcPmD3jeDgSMUmRzyO6rRpQ35MVbNqXB1Sct5MMRjYqqyDWfohO3ECAhbYI AZ7teN6xL6AB0ly6MJmEV86CLaz6XIG/7xxTyRso= Authentication-Results: mail-nwsmtp-smtp-corp-main-80.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v3 3/7] qapi: block-job-change: make copy-mode parameter optional Date: Wed, 2 Oct 2024 17:06:12 +0300 Message-Id: <20241002140616.561652-4-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241002140616.561652-1-vsementsov@yandex-team.ru> References: <20241002140616.561652-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 X-Yandex-Filter: 1 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TOKH3AW2FX2Y5J3VUD3ZWSGOIICP2PFW X-Message-ID-Hash: TOKH3AW2FX2Y5J3VUD3ZWSGOIICP2PFW X-MailFrom: vsementsov@yandex-team.ru X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: qemu-devel@nongnu.org, armbru@redhat.com, eblake@redhat.com, devel@lists.libvirt.org, hreitz@redhat.com, kwolf@redhat.com, vsementsov@yandex-team.ru, jsnow@redhat.com, pkrempa@redhat.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) X-ZM-MESSAGEID: 1727878115702116600 Content-Type: text/plain; charset="utf-8" We are going to add more parameters to change. We want to make possible to change only one or any subset of available options. So all the options should be optional. Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Markus Armbruster --- block/mirror.c | 4 ++++ qapi/block-core.json | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index 2816bb1042..60e8d83e4f 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1272,6 +1272,10 @@ static void mirror_change(BlockJob *job, JobChangeOp= tions *opts, =20 GLOBAL_STATE_CODE(); =20 + if (!change_opts->has_copy_mode) { + return; + } + if (qatomic_read(&s->copy_mode) =3D=3D change_opts->copy_mode) { return; } diff --git a/qapi/block-core.json b/qapi/block-core.json index 0156762024..f370593037 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -3072,11 +3072,12 @@ # # @copy-mode: Switch to this copy mode. Currently, only the switch # from 'background' to 'write-blocking' is implemented. +# If absent, copy mode remains the same. (optional since 9.2) # # Since: 8.2 ## { 'struct': 'JobChangeOptionsMirror', - 'data': { 'copy-mode' : 'MirrorCopyMode' } } + 'data': { '*copy-mode' : 'MirrorCopyMode' } } =20 ## # @JobChangeOptions: --=20 2.34.1