]> git.proxmox.com Git - mirror_qemu.git/commit - vl.c
vl: Drain before (block) job cancel when quitting
authorMax Reitz <mreitz@redhat.com>
Wed, 12 Jun 2019 22:08:38 +0000 (00:08 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 19 Jul 2019 13:17:54 +0000 (15:17 +0200)
commite6f0ac4d52ae99cf88d66bca8746beb0d25ef0cd
tree09d4706036edc4690019a848a51058a70e6d606d
parent86472071f484f0df26b62b6f8cb25059df62d889
vl: Drain before (block) job cancel when quitting

If the main loop cancels all block jobs while the block layer is not
drained, this cancelling may not happen instantaneously.  We can start a
drained section before vm_shutdown(), which entails another
bdrv_drain_all(); this nested bdrv_drain_all() will thus be a no-op,
basically.

We do not have to end the drained section, because we actually do not
want any requests to happen from this point on.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
vl.c