]> git.ipfire.org Git - thirdparty/qemu.git/commit
qemu: use bdrv_flush_all for vm_stop et al
authorJohn Snow <jsnow@redhat.com>
Fri, 23 Sep 2016 01:45:51 +0000 (21:45 -0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 2 Nov 2016 22:04:56 +0000 (17:04 -0500)
commit95200ebb5078a6718a8010528263994f9cb7ebaf
tree588e8f505e756adce88347fb8f7f212dbc72a6ef
parent8e94512568729c8dfaa9827b5417c7be3d2fb773
qemu: use bdrv_flush_all for vm_stop et al

Reimplement bdrv_flush_all for vm_stop. In contrast to blk_flush_all,
bdrv_flush_all does not have device model restrictions. This allows
us to flush and halt unconditionally without error.

This allows us to do things like migrate when we have a device with
an open tray, but has a node that may need to be flushed, or nodes
that aren't currently attached to any device and need to be flushed.

Specifically, this allows us to migrate when we have a CDROM with
an open tray.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 22af08eacf6b5aa0e6c0581e547380b3eb4f95e9)
Conflicts:
cpus.c

* drop context dependancy on 6d0ceb80

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
cpus.c