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@xxxxxxxxxxxxxx> > 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