util: file: Mark 'BeeGFS' as shared filesystem

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>
This commit is contained in:
Peter Krempa 2023-07-25 12:38:57 +02:00
parent 51ae80d6a7
commit 658660681c
2 changed files with 6 additions and 1 deletions

View 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);
}

View 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);