diff options
author | Barry Naujok <bnaujok@sgi.com> | 2008-05-21 02:58:55 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:58:42 -0400 |
commit | 189f4bf22bdc3c2402b038016d11fd3cb1c89f07 (patch) | |
tree | 98a168b063b87609fc28685ace7ce0fec589beff /fs/xfs/xfs_sb.h | |
parent | 384f3ced07efdddf6838f6527366089d37843c94 (diff) |
[XFS] XFS: ASCII case-insensitive support
Implement ASCII case-insensitive support. It's primary purpose is for
supporting existing filesystems that already use this case-insensitive
mode migrated from IRIX. But, if you only need ASCII-only case-insensitive
support (ie. English only) and will never use another language, then this
mode is perfectly adequate.
ASCII-CI is implemented by generating hashes based on lower-case letters
and doing lower-case compares. It implements a new xfs_nameops vector for
doing the hashes and comparisons for all filename operations.
To create a filesystem with this CI mode, use: # mkfs.xfs -n version=ci
<device>
SGI-PV: 981516
SGI-Modid: xfs-linux-melb:xfs-kern:31209a
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/xfs_sb.h')
-rw-r--r-- | fs/xfs/xfs_sb.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h index e3204a36a222..3f8cf1587f4c 100644 --- a/fs/xfs/xfs_sb.h +++ b/fs/xfs/xfs_sb.h | |||
@@ -46,10 +46,12 @@ struct xfs_mount; | |||
46 | #define XFS_SB_VERSION_SECTORBIT 0x0800 | 46 | #define XFS_SB_VERSION_SECTORBIT 0x0800 |
47 | #define XFS_SB_VERSION_EXTFLGBIT 0x1000 | 47 | #define XFS_SB_VERSION_EXTFLGBIT 0x1000 |
48 | #define XFS_SB_VERSION_DIRV2BIT 0x2000 | 48 | #define XFS_SB_VERSION_DIRV2BIT 0x2000 |
49 | #define XFS_SB_VERSION_BORGBIT 0x4000 /* ASCII only case-insens. */ | ||
49 | #define XFS_SB_VERSION_MOREBITSBIT 0x8000 | 50 | #define XFS_SB_VERSION_MOREBITSBIT 0x8000 |
50 | #define XFS_SB_VERSION_OKSASHFBITS \ | 51 | #define XFS_SB_VERSION_OKSASHFBITS \ |
51 | (XFS_SB_VERSION_EXTFLGBIT | \ | 52 | (XFS_SB_VERSION_EXTFLGBIT | \ |
52 | XFS_SB_VERSION_DIRV2BIT) | 53 | XFS_SB_VERSION_DIRV2BIT | \ |
54 | XFS_SB_VERSION_BORGBIT) | ||
53 | #define XFS_SB_VERSION_OKREALFBITS \ | 55 | #define XFS_SB_VERSION_OKREALFBITS \ |
54 | (XFS_SB_VERSION_ATTRBIT | \ | 56 | (XFS_SB_VERSION_ATTRBIT | \ |
55 | XFS_SB_VERSION_NLINKBIT | \ | 57 | XFS_SB_VERSION_NLINKBIT | \ |
@@ -437,6 +439,12 @@ static inline int xfs_sb_version_hassector(xfs_sb_t *sbp) | |||
437 | ((sbp)->sb_versionnum & XFS_SB_VERSION_SECTORBIT); | 439 | ((sbp)->sb_versionnum & XFS_SB_VERSION_SECTORBIT); |
438 | } | 440 | } |
439 | 441 | ||
442 | static inline int xfs_sb_version_hasasciici(xfs_sb_t *sbp) | ||
443 | { | ||
444 | return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ | ||
445 | (sbp->sb_versionnum & XFS_SB_VERSION_BORGBIT); | ||
446 | } | ||
447 | |||
440 | static inline int xfs_sb_version_hasmorebits(xfs_sb_t *sbp) | 448 | static inline int xfs_sb_version_hasmorebits(xfs_sb_t *sbp) |
441 | { | 449 | { |
442 | return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ | 450 | return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ |