[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 32/42] job: Move completion and cancellation to
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH 32/42] job: Move completion and cancellation to Job |
Date: |
Tue, 15 May 2018 14:59:48 +0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
Am 14.05.2018 um 22:53 hat Max Reitz geschrieben:
> On 2018-05-09 18:26, Kevin Wolf wrote:
> > This moves the top-level job completion and cancellation functions from
> > BlockJob to Job.
> >
> > Signed-off-by: Kevin Wolf <address@hidden>
> > @@ -3362,7 +3362,7 @@ static void bdrv_close(BlockDriverState *bs)
> >
> > void bdrv_close_all(void)
> > {
> > - block_job_cancel_sync_all();
> > + job_cancel_sync_all();
>
> Do we really want to cancel jobs that might have nothing to do with the
> block layer?
Yes, though I admit it's a bit ugly to do it here. Alternatively, I
could assert here that no jobs are running and pull the
job_cancel_sync_all() into the callers. For vl.c, this is trivial.
qemu-nbd.c uses 'atexit(bdrv_close_all);', so I'd have to introduce a
wrapper function that calls both job_cancel_sync_all() and
bdrv_close_all().
Would you prefer that?
Kevin
signature.asc
Description: PGP signature