util: virfile: Don't use VIR_FILE_SHFS_GFS2 for glusterfs

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: 478da65fb4
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-09-05 14:10:50 +02:00
parent ad0cbefb13
commit 74c499bdb0
2 changed files with 6 additions and 3 deletions

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

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