]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
savevm: Include writable devices with removable media
authorMarkus Armbruster <armbru@redhat.com>
Wed, 3 Aug 2011 13:08:11 +0000 (15:08 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 6 Sep 2011 09:24:07 +0000 (11:24 +0200)
commit07b70bfbb3f3aea9ce7a3a1da78cbfa8ae6bbce6
tree992011ee4e652f5add4e9668d6443e7923c954dc
parentc602a489f9685407d93beab3b121408811d20ce4
savevm: Include writable devices with removable media

savevm and loadvm silently ignore block devices with removable media,
such as floppies and SD cards.  Rolling back a VM to a previous
checkpoint will *not* roll back writes to block devices with removable
media.

Moreover, bdrv_is_removable() is a confused mess, and wrong in at
least one case: it considers "-drive if=xen,media=cdrom -M xenpv"
removable.  It'll be cleaned up later in this series.

Read-only block devices are also ignored, but that's okay.

Fix by ignoring only read-only block devices and empty block devices.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
savevm.c