summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2012-04-30 02:41:10 +0400
committerTheodore Ts'o <tytso@mit.edu>2012-04-30 02:41:10 +0400
commitb0336e8d2108e6302aecaadd17c6c0bd686da22d (patch)
tree063ec0bc590950b7ca0e2c5d5ed8a1c259ce1675 /fs/ext4/ext4.h
parentdbe89444042ab6540bc304343cfdcbc8b95d003d (diff)
downloadlinux-b0336e8d2108e6302aecaadd17c6c0bd686da22d.tar.xz
ext4: calculate and verify checksums of directory leaf blocks
Calculate and verify the checksums for directory leaf blocks (i.e. blocks that only contain actual directory entries). The checksum lives in what looks to be an unused directory entry with a 0 name_len at the end of the block. This scheme is not used for internal htree nodes because the mechanism in place there only costs one dx_entry, whereas the "empty" directory entry would cost two dx_entries. 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.h')
-rw-r--r--fs/ext4/ext4.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 7a4f16075257..57d7c356eaab 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2019,6 +2019,8 @@ extern long ext4_compat_ioctl(struct file *, unsigned int, unsigned long);
extern int ext4_ext_migrate(struct inode *);
/* namei.c */
+extern int ext4_dirent_csum_verify(struct inode *inode,
+ struct ext4_dir_entry *dirent);
extern int ext4_orphan_add(handle_t *, struct inode *);
extern int ext4_orphan_del(handle_t *, struct inode *);
extern int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,