From: Artem Blagodarenko Date: Tue, 5 Feb 2019 22:09:16 +0000 (-0500) Subject: e2fsck: allow to check >2GB sized directory X-Git-Tag: v1.44.6~11 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=49f28a06b73816b57880c47c2e0636a351ab6ff0;p=tools%2Fe2fsprogs.git e2fsck: allow to check >2GB sized directory After large_dir feature has been added, e2fsprogs is ready for directories > 2GB, so we can remove e2fsck directory size check. Signed-off-by: Artem Blagodarenko Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger --- diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 4553438..358f214 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -3646,9 +3646,12 @@ static int process_block(ext2_filsys fs, } } - if (p->is_dir && blockcnt > (1 << (21 - fs->super->s_log_block_size))) + if (p->is_dir && !ext2fs_has_feature_largedir(fs->super) && + blockcnt > (1 << (21 - fs->super->s_log_block_size))) problem = PR_1_TOOBIG_DIR; - if (p->is_reg && p->num_blocks+1 >= p->max_blocks) + if (p->is_dir && p->num_blocks + 1 >= p->max_blocks) + problem = PR_1_TOOBIG_DIR; + if (p->is_reg && p->num_blocks + 1 >= p->max_blocks) problem = PR_1_TOOBIG_REG; if (!p->is_dir && !p->is_reg && blockcnt > 0) problem = PR_1_TOOBIG_SYMLINK;