storage-daemon: Call job_cancel_sync_all() on shutdown

bdrv_close_all() asserts that no jobs are running any more, so we need
to cancel all jobs first to avoid failing the assertion.

Fixes: b55a3c8860
Reported-by: Nini Gu <ngu@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210309121814.31078-1-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Kevin Wolf 2021-03-09 13:18:14 +01:00
parent 729222af14
commit e215777071
3 changed files with 89 additions and 0 deletions

View file

@ -368,6 +368,7 @@ int main(int argc, char *argv[])
blk_exp_close_all();
bdrv_drain_all_begin();
job_cancel_sync_all();
bdrv_close_all();
monitor_cleanup();