]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: virfile: Don't use VIR_FILE_SHFS_GFS2 for glusterfs
authorPeter Krempa <pkrempa@redhat.com>
Mon, 5 Sep 2022 12:10:50 +0000 (14:10 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 5 Sep 2022 15:32:14 +0000 (17:32 +0200)
While the code works properly as no code path is specifically wanting to
check for glusterfs, we should properly declare glusterfs as a separate
from GFS2.

Fixes: 478da65fb46
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virfile.c
src/util/virfile.h

index 33a3ffe8f74b27566b746905e782bc8f41685b61..f5a61abd9ff980ffb9e328d19178d8f1f9ad17c7 100644 (file)
@@ -3331,7 +3331,7 @@ struct virFileSharedFsData {
 };
 
 static const struct virFileSharedFsData virFileSharedFsFUSE[] = {
-    { .mnttype = "fuse.glusterfs", .fstype = VIR_FILE_SHFS_GFS2 },
+    { .mnttype = "fuse.glusterfs", .fstype = VIR_FILE_SHFS_GLUSTERFS },
     { .mnttype = "fuse.quobyte", .fstype = VIR_FILE_SHFS_QB },
 };
 
@@ -3668,7 +3668,8 @@ int virFileIsSharedFS(const char *path)
                                  VIR_FILE_SHFS_CEPH |
                                  VIR_FILE_SHFS_GPFS|
                                  VIR_FILE_SHFS_QB |
-                                 VIR_FILE_SHFS_ACFS);
+                                 VIR_FILE_SHFS_ACFS |
+                                 VIR_FILE_SHFS_GLUSTERFS);
 }
 
 
@@ -3681,7 +3682,8 @@ virFileIsClusterFS(const char *path)
     return virFileIsSharedFSType(path,
                                  VIR_FILE_SHFS_GFS2 |
                                  VIR_FILE_SHFS_OCFS |
-                                 VIR_FILE_SHFS_CEPH);
+                                 VIR_FILE_SHFS_CEPH |
+                                 VIR_FILE_SHFS_GLUSTERFS);
 }
 
 
index c4d11ea21a316b478de84fb98fe27660fe849767..f7a31d9f5718a760f24b105cd84b8a70f37158cc 100644 (file)
@@ -222,6 +222,7 @@ enum {
     VIR_FILE_SHFS_GPFS = (1 << 7), /* General Parallel File System/IBM Spectrum Scale */
     VIR_FILE_SHFS_QB = (1 << 8), /* Quobyte shared filesystem */
     VIR_FILE_SHFS_ACFS = (1 << 9), /* Oracle ASM Cluster File System */
+    VIR_FILE_SHFS_GLUSTERFS = (1 << 10), /* gluster's FUSE-based client */
 };
 
 int virFileIsSharedFSType(const char *path, unsigned int fstypes) ATTRIBUTE_NONNULL(1);