diff options
author | Christoph Hellwig <hch@lst.de> | 2012-11-15 17:20:37 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-11-19 21:11:24 -0500 |
commit | bc02e8693d875c2a9b0037cfd37fe0b726d26403 (patch) | |
tree | 6896726d63947779f941a4daf055da142ad07985 /fs/xfs/xfs_sb.h | |
parent | 1813dd64057490e7a0678a885c4fe6d02f78bdc1 (diff) |
xfs: add CRC infrastructure
- add a mount feature bit for CRC enabled filesystems
- add some helpers for generating and verifying the CRCs
- add a copy_uuid helper
The checksumming helpers are loosely based on similar ones in sctp,
all other bits come from Dave Chinner.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_sb.h')
-rw-r--r-- | fs/xfs/xfs_sb.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h index f429d9d5d325..a05b45175fb0 100644 --- a/fs/xfs/xfs_sb.h +++ b/fs/xfs/xfs_sb.h | |||
@@ -81,6 +81,7 @@ struct xfs_mount; | |||
81 | #define XFS_SB_VERSION2_ATTR2BIT 0x00000008 /* Inline attr rework */ | 81 | #define XFS_SB_VERSION2_ATTR2BIT 0x00000008 /* Inline attr rework */ |
82 | #define XFS_SB_VERSION2_PARENTBIT 0x00000010 /* parent pointers */ | 82 | #define XFS_SB_VERSION2_PARENTBIT 0x00000010 /* parent pointers */ |
83 | #define XFS_SB_VERSION2_PROJID32BIT 0x00000080 /* 32 bit project id */ | 83 | #define XFS_SB_VERSION2_PROJID32BIT 0x00000080 /* 32 bit project id */ |
84 | #define XFS_SB_VERSION2_CRCBIT 0x00000100 /* metadata CRCs */ | ||
84 | 85 | ||
85 | #define XFS_SB_VERSION2_OKREALFBITS \ | 86 | #define XFS_SB_VERSION2_OKREALFBITS \ |
86 | (XFS_SB_VERSION2_LAZYSBCOUNTBIT | \ | 87 | (XFS_SB_VERSION2_LAZYSBCOUNTBIT | \ |
@@ -503,6 +504,12 @@ static inline int xfs_sb_version_hasprojid32bit(xfs_sb_t *sbp) | |||
503 | (sbp->sb_features2 & XFS_SB_VERSION2_PROJID32BIT); | 504 | (sbp->sb_features2 & XFS_SB_VERSION2_PROJID32BIT); |
504 | } | 505 | } |
505 | 506 | ||
507 | static inline int xfs_sb_version_hascrc(xfs_sb_t *sbp) | ||
508 | { | ||
509 | return (xfs_sb_version_hasmorebits(sbp) && | ||
510 | (sbp->sb_features2 & XFS_SB_VERSION2_CRCBIT)); | ||
511 | } | ||
512 | |||
506 | /* | 513 | /* |
507 | * end of superblock version macros | 514 | * end of superblock version macros |
508 | */ | 515 | */ |