summaryrefslogtreecommitdiff
path: root/e2fsck/e2fsck.h
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <krisman@collabora.co.uk>2018-11-30 19:39:06 -0500
committerTheodore Ts'o <tytso@mit.edu>2018-12-02 23:58:50 -0500
commit28b44ef08a6d2a9273d1a279f068d214da64a40c (patch)
tree44f508bccd6fbeb1383bb19cbf2035cfe67fd9d0 /e2fsck/e2fsck.h
parentab93e183180730b55ee1803978014fd4e623907b (diff)
downloade2fsprogs-28b44ef08a6d2a9273d1a279f068d214da64a40c.tar.gz
libext2fs: support encoding when calculating dx hashes
fsck must be aware of the superblock encoding and the casefold directory setting, such that it is able to correctly calculate the dentry hashes. [ Changed to use a stack-allocated buffer instead of a calling calloc() with a fixed size -- TYT ] Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'e2fsck/e2fsck.h')
-rw-r--r--e2fsck/e2fsck.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/e2fsck/e2fsck.h b/e2fsck/e2fsck.h
index cd5cba2f..1c7a67cb 100644
--- a/e2fsck/e2fsck.h
+++ b/e2fsck/e2fsck.h
@@ -109,6 +109,7 @@ struct dx_dir_info {
int hashversion;
short depth; /* depth of tree */
struct dx_dirblock_info *dx_block; /* Array of size numblocks */
+ int casefolded_hash;
};
#define DX_DIRBLOCK_ROOT 1
@@ -471,7 +472,8 @@ extern int e2fsck_dir_info_get_dotdot(e2fsck_t ctx, ext2_ino_t ino,
ext2_ino_t *dotdot);
/* dx_dirinfo.c */
-extern void e2fsck_add_dx_dir(e2fsck_t ctx, ext2_ino_t ino, int num_blocks);
+extern void e2fsck_add_dx_dir(e2fsck_t ctx, ext2_ino_t ino,
+ struct ext2_inode *inode, int num_blocks);
extern struct dx_dir_info *e2fsck_get_dx_dir_info(e2fsck_t ctx, ext2_ino_t ino);
extern void e2fsck_free_dx_dir_info(e2fsck_t ctx);
extern int e2fsck_get_num_dx_dirinfo(e2fsck_t ctx);