forked from pool/libvirt
267982bde3
- qemu: Fix logic bug in inactive snapshot deletion 0ddebdb4-qemu-snapshot-deletion.patch boo#1180049 OBS-URL: https://build.opensuse.org/request/show/856706 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=866
31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
commit 0ddebdb42e72a984d25793722a60b85c7c7d8f1f
|
|
Author: Peter Krempa <pkrempa@redhat.com>
|
|
Date: Wed Dec 9 10:08:53 2020 +0100
|
|
|
|
qemu: Fix logic bug in inactive snapshot deletion
|
|
|
|
Commit 926563dc3a6 which refactored the function call deleting the
|
|
snapshot's on disk state introduced a logic bug, which skips over the
|
|
deletion of libvirt metadata after the disk state deletion is done.
|
|
|
|
To fix it we must not return early.
|
|
|
|
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/109
|
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
Reviewed-by: Erik Skultety <eskultet@redhat.com>
|
|
|
|
Index: libvirt-6.10.0/src/qemu/qemu_domain.c
|
|
===================================================================
|
|
--- libvirt-6.10.0.orig/src/qemu/qemu_domain.c
|
|
+++ libvirt-6.10.0/src/qemu/qemu_domain.c
|
|
@@ -6594,7 +6594,8 @@ qemuDomainSnapshotDiscard(virQEMUDriverP
|
|
if (!def)
|
|
def = vm->def;
|
|
|
|
- return qemuDomainSnapshotForEachQcow2(driver, def, snap, "-d", true);
|
|
+ if (qemuDomainSnapshotForEachQcow2(driver, def, snap, "-d", true) < 0)
|
|
+ return -1;
|
|
} else {
|
|
priv = vm->privateData;
|
|
qemuDomainObjEnterMonitor(driver, vm);
|