]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsck: fix indexed dir rehash failure with metadata_csum enabled
authorJan Kara <jack@suse.cz>
Thu, 13 Feb 2020 10:15:57 +0000 (11:15 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 7 Mar 2020 19:16:59 +0000 (14:16 -0500)
commit9e6ec24e709d9a0ad5d2f11b5ec5ed232b87b16e
treee0aa88431b75defc520510d16ad6893c785db200
parent4ebce13292f54c96f43dcb1bd1d5b8df5dc8749d
e2fsck: fix indexed dir rehash failure with metadata_csum enabled

E2fsck directory rehashing code can fail with ENOSPC due to a bug in
ext2fs_htree_intnode_maxrecs() which fails to take metadata checksum
into account and thus e.g. e2fsck can decide to create 1 indirect level
of index tree when two are actually needed. Fix the logic to account for
metadata checksum.

Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext2fs.h