summaryrefslogtreecommitdiffstats
path: root/fs/ext4/namei.c
diff options
context:
space:
mode:
authorDarrick J. Wong2012-04-30 00:23:10 +0200
committerTheodore Ts'o2012-04-30 00:23:10 +0200
commite615391896064eb5a0c760d086b8e1c6ecfffeab (patch)
tree1d05a5e925579bc444468d88eacca00d633b8286 /fs/ext4/namei.c
parentext4: create a new BH_Verified flag to avoid unnecessary metadata validation (diff)
downloadkernel-qcow2-linux-e615391896064eb5a0c760d086b8e1c6ecfffeab.tar.gz
kernel-qcow2-linux-e615391896064eb5a0c760d086b8e1c6ecfffeab.tar.xz
kernel-qcow2-linux-e615391896064eb5a0c760d086b8e1c6ecfffeab.zip
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/namei.c')
-rw-r--r--fs/ext4/namei.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 349d7b3671c8..b58bd5c8ffe7 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -145,6 +145,14 @@ struct dx_map_entry
u16 size;
};
+/*
+ * This goes at the end of each htree block.
+ */
+struct dx_tail {
+ u32 dt_reserved;
+ __le32 dt_checksum; /* crc32c(uuid+inum+dirblock) */
+};
+
static inline ext4_lblk_t dx_get_block(struct dx_entry *entry);
static void dx_set_block(struct dx_entry *entry, ext4_lblk_t value);
static inline unsigned dx_get_hash(struct dx_entry *entry);