From: Markus Armbruster <armbru@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org,
eblake@redhat.com, devel@lists.libvirt.org, hreitz@redhat.com,
kwolf@redhat.com, jsnow@redhat.com, pkrempa@redhat.com,
f.ebner@proxmox.com
Subject: Re: [PATCH v2 3/7] qapi: block-job-change: make copy-mode parameter optional
Date: Thu, 18 Jul 2024 12:55:26 +0200 [thread overview]
Message-ID: <87plrbx941.fsf@pond.sub.org> (raw)
In-Reply-To: <20240626110124.374336-4-vsementsov@yandex-team.ru> (Vladimir Sementsov-Ogievskiy's message of "Wed, 26 Jun 2024 14:01:20 +0300")
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> writes:
> 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 <vsementsov@yandex-team.ru>
> ---
> 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, JobChangeOptions *opts,
>
> GLOBAL_STATE_CODE();
>
> + if (!change_opts->has_copy_mode) {
> + return;
> + }
> +
> if (qatomic_read(&s->copy_mode) == change_opts->copy_mode) {
> return;
> }
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 4ec5632596..660c7f4a48 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -3071,11 +3071,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.1)
> #
> # Since: 8.2
> ##
> { 'struct': 'JobChangeOptionsMirror',
> - 'data': { 'copy-mode' : 'MirrorCopyMode' } }
> + 'data': { '*copy-mode' : 'MirrorCopyMode' } }
>
> ##
> # @JobChangeOptions:
Acked-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2024-07-18 10:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 11:01 [PATCH v2 0/7] introduce job-change qmp command Vladimir Sementsov-Ogievskiy
2024-06-26 11:01 ` [PATCH v2 1/7] qapi: rename BlockJobChangeOptions to JobChangeOptions Vladimir Sementsov-Ogievskiy
2024-07-18 10:54 ` Markus Armbruster
2024-06-26 11:01 ` [PATCH v2 2/7] blockjob: block_job_change_locked(): check job type Vladimir Sementsov-Ogievskiy
2024-06-26 11:01 ` [PATCH v2 3/7] qapi: block-job-change: make copy-mode parameter optional Vladimir Sementsov-Ogievskiy
2024-07-18 10:55 ` Markus Armbruster [this message]
2024-06-26 11:01 ` [PATCH v2 4/7] blockjob: move change action implementation to job from block-job Vladimir Sementsov-Ogievskiy
2024-06-26 11:01 ` [PATCH v2 5/7] qapi: add job-change Vladimir Sementsov-Ogievskiy
2024-07-18 10:59 ` Markus Armbruster
2024-08-02 11:10 ` Vladimir Sementsov-Ogievskiy
2024-06-26 11:01 ` [PATCH v2 6/7] qapi/block-core: derpecate block-job-change Vladimir Sementsov-Ogievskiy
2024-07-18 11:01 ` Markus Armbruster
2024-08-02 11:10 ` Vladimir Sementsov-Ogievskiy
2024-08-02 13:20 ` Markus Armbruster
2024-08-02 13:36 ` Markus Armbruster
2024-06-26 11:01 ` [PATCH v2 7/7] iotests/mirror-change-copy-mode: switch to job-change command Vladimir Sementsov-Ogievskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87plrbx941.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=devel@lists.libvirt.org \
--cc=eblake@redhat.com \
--cc=f.ebner@proxmox.com \
--cc=hreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@yandex-team.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.