]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: file: Mark 'BeeGFS' as shared filesystem
authorPeter Krempa <pkrempa@redhat.com>
Tue, 25 Jul 2023 10:38:57 +0000 (12:38 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 25 Jul 2023 11:14:08 +0000 (13:14 +0200)
BeeGFS is a shared/distributed filesystem:

https://doc.beegfs.io/latest/overview/overview.html

Mark it as shared based on it's magic number:

https://git.beegfs.io/pub/v7/-/blob/master/client_module/source/filesystem/FhgfsOpsSuper.h#L14

Closes: https://gitlab.com/libvirt/libvirt/-/issues/508
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/virfile.c
src/util/virfile.h

index 7c44a2a96310df516a1734e2ce5557fcf5ba3261..2984e2ead25beccc9df8364eda41ab1e546e9351 100644 (file)
@@ -3382,6 +3382,8 @@ virFileRemoveLastComponent(char *path)
 # endif
 
 # define VIR_ACFS_MAGIC 0x61636673
+/* https://git.beegfs.io/pub/v7/-/blob/master/client_module/source/filesystem/FhgfsOpsSuper.h#L14 */
+# define VIR_BEEGFS_MAGIC 0x19830326 /* formerly fhgfs */
 
 # define PROC_MOUNTS "/proc/mounts"
 
@@ -3469,6 +3471,7 @@ static const struct virFileSharedFsData virFileSharedFs[] = {
     { .fstype = VIR_FILE_SHFS_CEPH, .magic = CEPH_SUPER_MAGIC },
     { .fstype = VIR_FILE_SHFS_GPFS, .magic = GPFS_SUPER_MAGIC },
     { .fstype = VIR_FILE_SHFS_ACFS, .magic = VIR_ACFS_MAGIC },
+    { .fstype = VIR_FILE_SHFS_BEEGFS, .magic = VIR_BEEGFS_MAGIC },
 };
 
 
@@ -3719,7 +3722,8 @@ int virFileIsSharedFS(const char *path)
                                  VIR_FILE_SHFS_GPFS|
                                  VIR_FILE_SHFS_QB |
                                  VIR_FILE_SHFS_ACFS |
-                                 VIR_FILE_SHFS_GLUSTERFS);
+                                 VIR_FILE_SHFS_GLUSTERFS |
+                                 VIR_FILE_SHFS_BEEGFS);
 }
 
 
index b75a7cc53b3d26dd08065e03801c9550aafc40df..60bb1d64e7ec82a2cd8bb84a1e3d2f03b84c8807 100644 (file)
@@ -226,6 +226,7 @@ enum {
     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 */
+    VIR_FILE_SHFS_BEEGFS = (1 << 11), /* BeeGFS/fhGFS */
 };
 
 int virFileIsSharedFSType(const char *path, unsigned int fstypes) ATTRIBUTE_NONNULL(1);