mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu_snapshot: call qemuSnapshotDeleteUpdateDisks only for external snapshots
Calling this function when deleting internal snapshot isn't required because with internal snapshots all changes are done within the file itself so there is no file deletion and no need to update snapshot metadata. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
ca7d1bd5ee
commit
79654f425c
@ -3537,6 +3537,7 @@ qemuSnapshotDiscardMetadata(virDomainObj *vm,
|
|||||||
if (rep.err < 0)
|
if (rep.err < 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
|
if (virDomainSnapshotIsExternal(snap)) {
|
||||||
data.snap = snap;
|
data.snap = snap;
|
||||||
data.vm = vm;
|
data.vm = vm;
|
||||||
data.error = 0;
|
data.error = 0;
|
||||||
@ -3545,6 +3546,7 @@ qemuSnapshotDiscardMetadata(virDomainObj *vm,
|
|||||||
&data);
|
&data);
|
||||||
if (data.error < 0)
|
if (data.error < 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
}
|
||||||
|
|
||||||
virDomainMomentMoveChildren(snap, snap->parent);
|
virDomainMomentMoveChildren(snap, snap->parent);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user