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:
Pavel Hrdina 2024-02-21 17:45:08 +01:00
parent ca7d1bd5ee
commit 79654f425c

View File

@ -3537,6 +3537,7 @@ qemuSnapshotDiscardMetadata(virDomainObj *vm,
if (rep.err < 0)
ret = -1;
if (virDomainSnapshotIsExternal(snap)) {
data.snap = snap;
data.vm = vm;
data.error = 0;
@ -3545,6 +3546,7 @@ qemuSnapshotDiscardMetadata(virDomainObj *vm,
&data);
if (data.error < 0)
ret = -1;
}
virDomainMomentMoveChildren(snap, snap->parent);
}