]> git.proxmox.com Git - qemu.git/commit - blockdev.c
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)
committerKevin Wolf <kwolf@redhat.com>
Mon, 24 Sep 2012 13:15:11 +0000 (15:15 +0200)
commit80dd1aae3657a902d262f5d20a7a3c655b23705e
treec4a22665f9d5483e89184d14ad018fdc97298ad1
parentd3e8f95753114a827f9cd8e819b1d5cc8333f76b
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>
blockdev.c