]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Open backing image in force share mode for size probe
authorFam Zheng <famz@redhat.com>
Fri, 15 Dec 2017 08:04:45 +0000 (16:04 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Jan 2018 16:49:44 +0000 (10:49 -0600)
commit7f53a8107386d2943ff83c3224775a3eea82b767
tree30f0f50a0d5328ca30596b79c7c6144cbc5f0f61
parent2b0c34cf61dbf9fa2d3ab78f0c43609cb781c5a9
block: Open backing image in force share mode for size probe

Management tools create overlays of running guests with qemu-img:

  $ qemu-img create -b /image/in/use.qcow2 -f qcow2 /overlay/image.qcow2

but this doesn't work anymore due to image locking:

    qemu-img: /overlay/image.qcow2: Failed to get shared "write" lock
    Is another process using the image?
    Could not open backing image to determine size.
Use the force share option to allow this use case again.

Cc: qemu-stable@nongnu.org
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit cc954f01e3c004aad081aa36736a17e842b80211)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block.c