qemuDomainSnapshotForEachQcow2Raw: Act only on internal snapshots

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>
This commit is contained in:
Peter Krempa 2022-03-08 18:08:54 +01:00
parent fe6e11e856
commit fc81be4bfa

View 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)) {