summaryrefslogtreecommitdiff
path: root/fs/ext4/namei.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2012-04-30 02:23:10 +0400
committerTheodore Ts'o <tytso@mit.edu>2012-04-30 02:23:10 +0400
commite615391896064eb5a0c760d086b8e1c6ecfffeab (patch)
tree1d05a5e925579bc444468d88eacca00d633b8286 /fs/ext4/namei.c
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/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);