]> xenbits.xensource.com Git - libvirt.git/commitdiff
virDomainDiskTranslateSourcePool: Don't re-translate already translated defs
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Oct 2023 14:18:12 +0000 (16:18 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 Oct 2023 12:16:14 +0000 (14:16 +0200)
If a disk definition was already translated re-doing it makes no sense.

Skip the translation if the 'actualtype' is already populated.

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

index 3e0989e2e8b9f4bc6dd059e61783f7b3f8fb9e2d..e128457b002b0e2e4d9d958b82e684bae2f24770 100644 (file)
@@ -30529,7 +30529,7 @@ virDomainDiskTranslateSourcePool(virDomainDiskDef *def)
     virStorageSource *n;
 
     for (n = def->src; virStorageSourceIsBacking(n); n = n->backingStore) {
-        if (n->type != VIR_STORAGE_TYPE_VOLUME || !n->srcpool)
+        if (n->type != VIR_STORAGE_TYPE_VOLUME || !n->srcpool || n->srcpool->actualtype != VIR_STORAGE_TYPE_NONE)
             continue;
 
         if (!conn) {