[libvirt] [PATCH 1/2] virDomainDiskDefForeachPath: Prefer virStorageSourceIsLocalStorage

Michal Privoznik mprivozn at redhat.com
Fri Mar 31 11:13:50 UTC 2017


Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/conf/domain_conf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1b0a55b..01553b5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -25342,10 +25342,8 @@ virDomainDiskDefForeachPath(virDomainDiskDefPtr disk,
     }
 
     for (tmp = disk->src; tmp; tmp = tmp->backingStore) {
-        int actualType = virStorageSourceGetActualType(tmp);
         /* execute the callback only for local storage */
-        if (actualType != VIR_STORAGE_TYPE_NETWORK &&
-            actualType != VIR_STORAGE_TYPE_VOLUME &&
+        if (virStorageSourceIsLocalStorage(tmp) &&
             tmp->path) {
             if (iter(disk, tmp->path, depth, opaque) < 0)
                 goto cleanup;
-- 
2.10.2




More information about the libvir-list mailing list