]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuDomainVirStorageSourceFindByNodeName: Match also '<dataStore>' sources
authorPeter Krempa <pkrempa@redhat.com>
Tue, 26 Nov 2024 08:35:47 +0000 (09:35 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 28 Nov 2024 09:27:56 +0000 (10:27 +0100)
As the source for the data file is a completely separate
virStorageSource including it's own index we need to match it
explicitly, so that code such as storage threshold events work properly
and separately for the data file.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_domain.c

index 150f0736f3f6348556201ceff51d194c0b3f70f1..4499fed6bce365df8861b54b2a905180ebca9af6 100644 (file)
@@ -2921,6 +2921,10 @@ qemuDomainVirStorageSourceFindByNodeName(virStorageSource *top,
     for (tmp = top; virStorageSourceIsBacking(tmp); tmp = tmp->backingStore) {
         if (qemuDomainVirStorageSourceMatchNodename(tmp, nodeName))
             return tmp;
+
+        if (tmp->dataFileStore &&
+            qemuDomainVirStorageSourceMatchNodename(tmp->dataFileStore, nodeName))
+            return tmp->dataFileStore;
     }
 
     return NULL;