aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4_extents.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2012-04-29 18:23:10 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-04-29 18:23:10 -0400
commite615391896064eb5a0c760d086b8e1c6ecfffeab (patch)
tree1d05a5e925579bc444468d88eacca00d633b8286 /fs/ext4/ext4_extents.h
parentf84891289e62a74e9b4942eaad80617368b2d778 (diff)
ext4: change on-disk layout to support extended metadata checksumming
Define flags and change structure definitions to allow checksumming of ext4 metadata. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4_extents.h')
-rw-r--r--fs/ext4/ext4_extents.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ext4/ext4_extents.h b/fs/ext4/ext4_extents.h
index 0f58b86e3a02..94822e74ef73 100644
--- a/fs/ext4/ext4_extents.h
+++ b/fs/ext4/ext4_extents.h
@@ -63,9 +63,22 @@
63 * ext4_inode has i_block array (60 bytes total). 63 * ext4_inode has i_block array (60 bytes total).
64 * The first 12 bytes store ext4_extent_header; 64 * The first 12 bytes store ext4_extent_header;
65 * the remainder stores an array of ext4_extent. 65 * the remainder stores an array of ext4_extent.
66 * For non-inode extent blocks, ext4_extent_tail
67 * follows the array.
66 */ 68 */
67 69
68/* 70/*
71 * This is the extent tail on-disk structure.
72 * All other extent structures are 12 bytes long. It turns out that
73 * block_size % 12 >= 4 for at least all powers of 2 greater than 512, which
74 * covers all valid ext4 block sizes. Therefore, this tail structure can be
75 * crammed into the end of the block without having to rebalance the tree.
76 */
77struct ext4_extent_tail {
78 __le32 et_checksum; /* crc32c(uuid+inum+extent_block) */
79};
80
81/*
69 * This is the extent on-disk structure. 82 * This is the extent on-disk structure.
70 * It's used at the bottom of the tree. 83 * It's used at the bottom of the tree.
71 */ 84 */