[PATCH 3/7] virDomainDiskTranslateSourcePool: Don't re-translate already translated defs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 3e0989e2e8..e128457b00 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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) {
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux