diff options
author | Mark Tinguely <tinguely@sgi.com> | 2013-08-19 16:19:36 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-22 09:49:59 -0400 |
commit | 3e3c51cee9a07d67e3910cc514867b56ac60ec94 (patch) | |
tree | fd5880e5607c282a93a5943d7823520720c56687 /fs/xfs | |
parent | 1c55cece084aa4c9a3fa34ed4eecbdf18afbf05d (diff) |
xfs: add xfs sb v4 support for dirent filetype field
Add XFS superblock v4 support for the file type field in the
directory entry feature.
This support adds a feature bit for version 4 superblocks and
leaves the original superblock 5 incompatibility bit.
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Geoffrey Wehrman <gwehrman@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_sb.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h index c8d88989bad6..6835b44f850e 100644 --- a/fs/xfs/xfs_sb.h +++ b/fs/xfs/xfs_sb.h | |||
@@ -84,11 +84,13 @@ struct xfs_trans; | |||
84 | #define XFS_SB_VERSION2_PARENTBIT 0x00000010 /* parent pointers */ | 84 | #define XFS_SB_VERSION2_PARENTBIT 0x00000010 /* parent pointers */ |
85 | #define XFS_SB_VERSION2_PROJID32BIT 0x00000080 /* 32 bit project id */ | 85 | #define XFS_SB_VERSION2_PROJID32BIT 0x00000080 /* 32 bit project id */ |
86 | #define XFS_SB_VERSION2_CRCBIT 0x00000100 /* metadata CRCs */ | 86 | #define XFS_SB_VERSION2_CRCBIT 0x00000100 /* metadata CRCs */ |
87 | #define XFS_SB_VERSION2_FTYPE 0x00000200 /* inode type in dir */ | ||
87 | 88 | ||
88 | #define XFS_SB_VERSION2_OKREALFBITS \ | 89 | #define XFS_SB_VERSION2_OKREALFBITS \ |
89 | (XFS_SB_VERSION2_LAZYSBCOUNTBIT | \ | 90 | (XFS_SB_VERSION2_LAZYSBCOUNTBIT | \ |
90 | XFS_SB_VERSION2_ATTR2BIT | \ | 91 | XFS_SB_VERSION2_ATTR2BIT | \ |
91 | XFS_SB_VERSION2_PROJID32BIT) | 92 | XFS_SB_VERSION2_PROJID32BIT | \ |
93 | XFS_SB_VERSION2_FTYPE) | ||
92 | #define XFS_SB_VERSION2_OKSASHFBITS \ | 94 | #define XFS_SB_VERSION2_OKSASHFBITS \ |
93 | (0) | 95 | (0) |
94 | #define XFS_SB_VERSION2_OKREALBITS \ | 96 | #define XFS_SB_VERSION2_OKREALBITS \ |
@@ -631,8 +633,10 @@ static inline int xfs_sb_version_has_pquotino(xfs_sb_t *sbp) | |||
631 | 633 | ||
632 | static inline int xfs_sb_version_hasftype(struct xfs_sb *sbp) | 634 | static inline int xfs_sb_version_hasftype(struct xfs_sb *sbp) |
633 | { | 635 | { |
634 | return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 && | 636 | return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 && |
635 | xfs_sb_has_incompat_feature(sbp, XFS_SB_FEAT_INCOMPAT_FTYPE); | 637 | xfs_sb_has_incompat_feature(sbp, XFS_SB_FEAT_INCOMPAT_FTYPE)) || |
638 | (xfs_sb_version_hasmorebits(sbp) && | ||
639 | (sbp->sb_features2 & XFS_SB_VERSION2_FTYPE)); | ||
636 | } | 640 | } |
637 | 641 | ||
638 | /* | 642 | /* |