summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/131
diff options
context:
space:
mode:
authorDenis V. Lunev2015-04-28 09:46:53 +0200
committerStefan Hajnoczi2015-05-22 10:37:32 +0200
commit6dd6b9f1440c37811ad963b49a48bf80a8bde377 (patch)
tree6b4fadcc31d66af8e3058324471c1496d32fb73b /tests/qemu-iotests/131
parentblock/parallels: implement parallels_check method of block driver (diff)
downloadqemu-6dd6b9f1440c37811ad963b49a48bf80a8bde377.tar.gz
qemu-6dd6b9f1440c37811ad963b49a48bf80a8bde377.tar.xz
qemu-6dd6b9f1440c37811ad963b49a48bf80a8bde377.zip
block/parallels: implement incorrect close detection
The software driver must set inuse field in Parallels header to 0x746F6E59 when the image is opened in read-write mode. The presence of this magic in the header on open forces image consistency check. There is an unfortunate trick here. We can not check for inuse in parallels_check as this will happen too late. It is possible to do that for simple check, but during the fix this would always report an error as the image was opened in BDRV_O_RDWR mode. Thus we save the flag in BDRVParallelsState for this. On the other hand, nothing should be done to clear inuse in parallels_check. Generic close will do the job right. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Roman Kagan <rkagan@parallels.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Roman Kagan <rkagan@parallels.com> Message-id: 1430207220-24458-21-git-send-email-den@openvz.org CC: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/131')
0 files changed, 0 insertions, 0 deletions