]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuDomainSnapshotForEachQcow2Raw: Act only on internal snapshots
authorPeter Krempa <pkrempa@redhat.com>
Tue, 8 Mar 2022 17:08:54 +0000 (18:08 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 11 Mar 2022 12:55:50 +0000 (13:55 +0100)
Similarly to the external snapshot code the internal inactive snapshot
creation helper should act only when an internal snapshot of the disk is
required. For now the callers ensure that it's either _INTERNAL or _NO
when control reaches this function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_domain.c

index 936a0c8a3593d3ab1fd4d28a15b7dd21ae906ba7..f61509d00b23ad0f299212560e166e778b55fe9c 100644 (file)
@@ -6886,7 +6886,7 @@ qemuDomainSnapshotForEachQcow2Raw(virQEMUDriver *driver,
 
         /* FIXME: we also need to handle LVM here */
         if (def->disks[i]->device != VIR_DOMAIN_DISK_DEVICE_DISK ||
-            snapdef->disks[i].snapshot == VIR_DOMAIN_SNAPSHOT_LOCATION_NO)
+            snapdef->disks[i].snapshot != VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL)
             continue;
 
         if (!virStorageSourceIsLocalStorage(def->disks[i]->src)) {