mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
qemuCheckpointDiscardBitmaps: Reopen images for bitmap modifications
Qemu's bitmap APIs don't reopen the appropriate images read-write for modification. It's libvirt's duty to reopen them via blockdev-reopen if we wish to modify the bitmaps. Use the new helpers to reopen the images for bitmap manipulation. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
96063ce280
commit
c6d117528c
@ -300,6 +300,10 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
|
|||||||
false, false, false) < 0)
|
false, false, false) < 0)
|
||||||
goto relabel;
|
goto relabel;
|
||||||
|
|
||||||
|
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN) &&
|
||||||
|
qemuBlockReopenReadWrite(vm, src, QEMU_ASYNC_JOB_NONE) < 0)
|
||||||
|
goto relabel;
|
||||||
|
|
||||||
relabelimages = g_slist_prepend(relabelimages, src);
|
relabelimages = g_slist_prepend(relabelimages, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,6 +316,9 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
|
|||||||
for (next = relabelimages; next; next = next->next) {
|
for (next = relabelimages; next; next = next->next) {
|
||||||
virStorageSourcePtr src = next->data;
|
virStorageSourcePtr src = next->data;
|
||||||
|
|
||||||
|
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN))
|
||||||
|
ignore_value(qemuBlockReopenReadOnly(vm, src, QEMU_ASYNC_JOB_NONE));
|
||||||
|
|
||||||
ignore_value(qemuDomainStorageSourceAccessAllow(driver, vm, src,
|
ignore_value(qemuDomainStorageSourceAccessAllow(driver, vm, src,
|
||||||
true, false, false));
|
true, false, false));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user