summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4_extents.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2012-04-29 22:23:10 (GMT)
committerTheodore Ts'o <tytso@mit.edu>2012-04-29 22:23:10 (GMT)
commite615391896064eb5a0c760d086b8e1c6ecfffeab (patch)
tree1d05a5e925579bc444468d88eacca00d633b8286 /fs/ext4/ext4_extents.h
parentf84891289e62a74e9b4942eaad80617368b2d778 (diff)
downloadlinux-e615391896064eb5a0c760d086b8e1c6ecfffeab.tar.xz
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 0f58b86..94822e7 100644
--- a/fs/ext4/ext4_extents.h
+++ b/fs/ext4/ext4_extents.h
@@ -63,9 +63,22 @@
* ext4_inode has i_block array (60 bytes total).
* The first 12 bytes store ext4_extent_header;
* the remainder stores an array of ext4_extent.
+ * For non-inode extent blocks, ext4_extent_tail
+ * follows the array.
*/
/*
+ * This is the extent tail on-disk structure.
+ * All other extent structures are 12 bytes long. It turns out that
+ * block_size % 12 >= 4 for at least all powers of 2 greater than 512, which
+ * covers all valid ext4 block sizes. Therefore, this tail structure can be
+ * crammed into the end of the block without having to rebalance the tree.
+ */
+struct ext4_extent_tail {
+ __le32 et_checksum; /* crc32c(uuid+inum+extent_block) */
+};
+
+/*
* This is the extent on-disk structure.
* It's used at the bottom of the tree.
*/