On 2018-05-15 14:59, Kevin Wolf wrote: > 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 > >>> @@ -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? Yes, I'd like that. Thanks! Max