[PATCHv5 3/4] domain: conf: Bypass virDomainDiskDefForeachPath for network volumes

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

 



virDomainDiskDefForeachPath returned 0 previously for disks of type
VIR_DOMAIN_DISK_TYPE_NETWORK. This patch extends this check to also
bypass the function for VIR_DOMAIN_DISK_TYPE_VOLUME, shoudl the new
disk variable def->actualtype contain VIR_DOMAIN_DISK_TYPE_NETWORK.
---
 src/conf/domain_conf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b76cf26..332cb50 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17970,7 +17970,8 @@ virDomainDiskDefForeachPath(virDomainDiskDefPtr disk,
     if (!disk->src || disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK ||
         (disk->type == VIR_DOMAIN_DISK_TYPE_VOLUME &&
          disk->srcpool &&
-         disk->srcpool->mode == VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT))
+         (disk->srcpool->mode == VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT ||
+          disk->srcpool->actualtype == VIR_DOMAIN_DISK_TYPE_NETWORK)))
         return 0;
 
     if (iter(disk, disk->src, 0, opaque) < 0)
-- 
1.8.4.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]