From: Kevin Wolf <kwolf@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, armbru@redhat.com,
eblake@redhat.com, devel@lists.libvirt.org, hreitz@redhat.com,
jsnow@redhat.com, pkrempa@redhat.com
Subject: Re: [PATCH v3 4/7] blockjob: move change action implementation to job from block-job
Date: Tue, 22 Oct 2024 15:00:18 +0200 [thread overview]
Message-ID: <Zxeh4rNpVRTbciKi@redhat.com> (raw)
In-Reply-To: <20241002140616.561652-5-vsementsov@yandex-team.ru>
Am 02.10.2024 um 16:06 hat Vladimir Sementsov-Ogievskiy geschrieben:
> Like for other block-job-* APIs we want have the actual functionality
> in job layer and make block-job-change to be a deprecated duplication
> of job-change in the following commit.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> diff --git a/include/qemu/job.h b/include/qemu/job.h
> index 2b873f2576..6fa525dac3 100644
> --- a/include/qemu/job.h
> +++ b/include/qemu/job.h
> @@ -27,6 +27,7 @@
> #define JOB_H
>
> #include "qapi/qapi-types-job.h"
> +#include "qapi/qapi-types-block-core.h"
> #include "qemu/queue.h"
> #include "qemu/progress_meter.h"
> #include "qemu/coroutine.h"
> @@ -307,6 +308,12 @@ struct JobDriver {
> */
> bool (*cancel)(Job *job, bool force);
>
> + /**
> + * Change the @job's options according to @opts.
> + *
> + * Note that this can already be called before the job coroutine is running.
> + */
> + void (*change)(Job *job, JobChangeOptions *opts, Error **errp);
>
> /**
> * Called when the job is freed.
> @@ -705,6 +712,11 @@ void job_finalize_locked(Job *job, Error **errp);
> */
> void job_dismiss_locked(Job **job, Error **errp);
>
> +/**
> + * Change the job according to opts.
> + */
> +void job_change_locked(Job *job, JobChangeOptions *opts, Error **errp);
Other functions in this header document the locking behaviour. The right
one here seems to be: "Called with job_lock held, but might release it
temporarily."
Kevin
next prev parent reply other threads:[~2024-10-22 13:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 14:06 [PATCH v3 0/7] introduce job-change qmp command Vladimir Sementsov-Ogievskiy
2024-10-02 14:06 ` [PATCH v3 1/7] qapi: rename BlockJobChangeOptions to JobChangeOptions Vladimir Sementsov-Ogievskiy
2024-10-02 14:06 ` [PATCH v3 2/7] blockjob: block_job_change_locked(): check job type Vladimir Sementsov-Ogievskiy
2024-10-02 14:06 ` [PATCH v3 3/7] qapi: block-job-change: make copy-mode parameter optional Vladimir Sementsov-Ogievskiy
2024-10-22 12:35 ` Kevin Wolf
2024-10-29 11:32 ` Vladimir Sementsov-Ogievskiy
2024-10-02 14:06 ` [PATCH v3 4/7] blockjob: move change action implementation to job from block-job Vladimir Sementsov-Ogievskiy
2024-10-22 13:00 ` Kevin Wolf [this message]
2024-10-02 14:06 ` [PATCH v3 5/7] qapi: add job-change Vladimir Sementsov-Ogievskiy
2024-10-22 13:03 ` Kevin Wolf
2024-10-02 14:06 ` [PATCH v3 6/7] qapi/block-core: deprecate block-job-change Vladimir Sementsov-Ogievskiy
2024-11-07 7:37 ` Markus Armbruster
2024-10-02 14:06 ` [PATCH v3 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=Zxeh4rNpVRTbciKi@redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=devel@lists.libvirt.org \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=jsnow@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).