diff options
Diffstat (limited to 'fs/xfs/xfs_sb.h')
-rw-r--r-- | fs/xfs/xfs_sb.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h index db7593f4bc7e..3c297a451622 100644 --- a/fs/xfs/xfs_sb.h +++ b/fs/xfs/xfs_sb.h @@ -555,12 +555,6 @@ static inline void xfs_sb_version_addprojid32bit(xfs_sb_t *sbp) sbp->sb_bad_features2 |= XFS_SB_VERSION2_PROJID32BIT; } -static inline int xfs_sb_version_hascrc(xfs_sb_t *sbp) -{ - return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5; -} - - /* * Extended v5 superblock feature masks. These are to be used for new v5 * superblock features only. @@ -599,7 +593,9 @@ xfs_sb_has_ro_compat_feature( return (sbp->sb_features_ro_compat & feature) != 0; } +#define XFS_SB_FEAT_INCOMPAT_FTYPE (1 << 0) /* filetype in dirent */ #define XFS_SB_FEAT_INCOMPAT_ALL 0 + #define XFS_SB_FEAT_INCOMPAT_UNKNOWN ~XFS_SB_FEAT_INCOMPAT_ALL static inline bool xfs_sb_has_incompat_feature( @@ -619,11 +615,25 @@ xfs_sb_has_incompat_log_feature( return (sbp->sb_features_log_incompat & feature) != 0; } +/* + * V5 superblock specific feature checks + */ +static inline int xfs_sb_version_hascrc(xfs_sb_t *sbp) +{ + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5; +} + static inline int xfs_sb_version_has_pquotino(xfs_sb_t *sbp) { return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5; } +static inline int xfs_sb_version_hasftype(struct xfs_sb *sbp) +{ + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 && + xfs_sb_has_incompat_feature(sbp, XFS_SB_FEAT_INCOMPAT_FTYPE); +} + /* * end of superblock version macros */ |