]> git.ipfire.org Git - thirdparty/qemu.git/commit
blockdev: preserve readonly and snapshot states across media changes
authorKevin Shanahan <kmshanah@disenchant.net>
Thu, 20 Sep 2012 23:20:22 +0000 (08:50 +0930)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 12 Oct 2012 02:44:20 +0000 (21:44 -0500)
commit513cdda198bac6c40e8847c8e8136ec974b67da7
tree68f44731b2035553e5e704eb0f4a3440425500de
parenteea54caab066abb4c82573d552a49747f896665d
blockdev: preserve readonly and snapshot states across media changes

If readonly=on is given at device creation time, the ->readonly flag
needs to be set in the block driver state for this device so that
readonly-ness is preserved across media changes (qmp change command).
Similarly, to preserve the snapshot property requires ->open_flags to
be correct.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 80dd1aae3657a902d262f5d20a7a3c655b23705e)

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