storage-daemon: Call job_cancel_sync_all() on shutdown
commite21577707152c10017dcf4d3340e83b100057355
authorKevin Wolf <kwolf@redhat.com>
Tue, 9 Mar 2021 12:18:14 +0000 (9 13:18 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 19 Mar 2021 09:15:06 +0000 (19 10:15 +0100)
tree2830b54dc4adf144c0539232d581a253a43db33f
parent729222af149db3cfaaa5ef1c0773b5c632b7dbee
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: b55a3c8860b763b62b2cc2f4a6f55379977bbde5
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>
storage-daemon/qemu-storage-daemon.c
tests/qemu-iotests/tests/qsd-jobs [new file with mode: 0755]
tests/qemu-iotests/tests/qsd-jobs.out [new file with mode: 0644]