On Mon, Mar 13, 2023 at 16:42:14 +0100, Pavel Hrdina wrote:
In this case there is no need to run block commit and using qemu
process
at all.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/qemu/qemu_snapshot.c | 52 ++++++++++++++++++++++------------------
1 file changed, 29 insertions(+), 23 deletions(-)
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index 6ff18d7a9e..be2e5c8cc4 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -2597,34 +2597,40 @@ qemuSnapshotDeleteExternalPrepare(virDomainObj *vm,
[...]
Please explain the logic and implications in a comment above this
condition.
+ if (snap != virDomainSnapshotGetCurrent(vm->snapshots)
&&
+ snap->nchildren == 0) {
+ if (qemuSnapshotDeleteExternalPrepareData(vm, snap, false, externalData) <
0)
return -1;
} else {
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>