mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
qemu: snapshot: Always rewrite backingStore data when reusing existing images
Don't adopt the backing store data when reusing images provided by the user. This will force a backing chain re-probe as users might have passed in something unexpected in the overlay where our view of the backing chain would not correspond. This is done only for inactive snapshots as there we have way less verification. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
201156ec6e
commit
8e9e73a984
@ -14699,7 +14699,8 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver,
|
||||
if (virStorageSourceInitChainElement(newsrc, defdisk->src, false) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virStorageSourceHasBacking(defdisk->src)) {
|
||||
if (!reuse &&
|
||||
virStorageSourceHasBacking(defdisk->src)) {
|
||||
defdisk->src->readonly = true;
|
||||
newsrc->backingStore = g_steal_pointer(&defdisk->src);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user