diff options
author | Christoph Hellwig <hch@lst.de> | 2013-04-21 15:53:46 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-04-21 15:53:46 -0400 |
commit | ee1a47ab0e77600fcbdf1c87d461bd8f3f63150d (patch) | |
tree | 6340d9f4b8b53c0d18045da1372599645375efce /fs/xfs/xfs_alloc_btree.h | |
parent | a2050646f655a90400cbb66c3866d2e0137eee0c (diff) |
xfs: add support for large btree blocks
Add support for larger btree blocks that contains a CRC32C checksum,
a filesystem uuid and block number for detecting filesystem
consistency and out of place writes.
[dchinner@redhat.com] Also include an owner field to allow reverse
mappings to be implemented for improved repairability and a LSN
field to so that log recovery can easily determine the last
modification that made it to disk for each buffer.
[dchinner@redhat.com] Add buffer log format flags to indicate the
type of buffer to recovery so that we don't have to do blind magic
number tests to determine what the buffer is.
[dchinner@redhat.com] Modified to fit into the verifier structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_alloc_btree.h')
-rw-r--r-- | fs/xfs/xfs_alloc_btree.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/xfs/xfs_alloc_btree.h b/fs/xfs/xfs_alloc_btree.h index 7e89a2b429dd..e3a3f7424192 100644 --- a/fs/xfs/xfs_alloc_btree.h +++ b/fs/xfs/xfs_alloc_btree.h | |||
@@ -31,8 +31,10 @@ struct xfs_mount; | |||
31 | * by blockcount and blockno. All blocks look the same to make the code | 31 | * by blockcount and blockno. All blocks look the same to make the code |
32 | * simpler; if we have time later, we'll make the optimizations. | 32 | * simpler; if we have time later, we'll make the optimizations. |
33 | */ | 33 | */ |
34 | #define XFS_ABTB_MAGIC 0x41425442 /* 'ABTB' for bno tree */ | 34 | #define XFS_ABTB_MAGIC 0x41425442 /* 'ABTB' for bno tree */ |
35 | #define XFS_ABTC_MAGIC 0x41425443 /* 'ABTC' for cnt tree */ | 35 | #define XFS_ABTB_CRC_MAGIC 0x41423342 /* 'AB3B' */ |
36 | #define XFS_ABTC_MAGIC 0x41425443 /* 'ABTC' for cnt tree */ | ||
37 | #define XFS_ABTC_CRC_MAGIC 0x41423343 /* 'AB3C' */ | ||
36 | 38 | ||
37 | /* | 39 | /* |
38 | * Data record/key structure | 40 | * Data record/key structure |
@@ -59,10 +61,10 @@ typedef __be32 xfs_alloc_ptr_t; | |||
59 | 61 | ||
60 | /* | 62 | /* |
61 | * Btree block header size depends on a superblock flag. | 63 | * Btree block header size depends on a superblock flag. |
62 | * | ||
63 | * (not quite yet, but soon) | ||
64 | */ | 64 | */ |
65 | #define XFS_ALLOC_BLOCK_LEN(mp) XFS_BTREE_SBLOCK_LEN | 65 | #define XFS_ALLOC_BLOCK_LEN(mp) \ |
66 | (xfs_sb_version_hascrc(&((mp)->m_sb)) ? \ | ||
67 | XFS_BTREE_SBLOCK_CRC_LEN : XFS_BTREE_SBLOCK_LEN) | ||
66 | 68 | ||
67 | /* | 69 | /* |
68 | * Record, key, and pointer address macros for btree blocks. | 70 | * Record, key, and pointer address macros for btree blocks. |