[libvirt] [PATCH v2 2/3] storage: Adjust command arglist for gluster

John Ferlan jferlan at redhat.com
Mon Jun 15 21:30:36 UTC 2015


In order for the glusterfs boolean to be set, the pool->def->type must be
VIR_STORAGE_POOL_NETFS, thus the check within virCommandNewArgList whether
pool->def->type is VIR_STORAGE_POOL_FS will never be true, so remove it

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/storage/storage_backend_fs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 8487f08..d2cf470 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -462,9 +462,7 @@ virStorageBackendFileSystemMount(virStoragePoolObjPtr pool)
     else if (glusterfs)
         cmd = virCommandNewArgList(MOUNT,
                                    "-t",
-                                   (pool->def->type == VIR_STORAGE_POOL_FS ?
-                                    virStoragePoolFormatFileSystemTypeToString(pool->def->source.format) :
-                                    virStoragePoolFormatFileSystemNetTypeToString(pool->def->source.format)),
+                                   virStoragePoolFormatFileSystemNetTypeToString(pool->def->source.format),
                                    src,
                                    "-o",
                                    "direct-io-mode=1",
-- 
2.1.0




More information about the libvir-list mailing list