From: c17828 Date: Mon, 10 Dec 2018 08:12:05 +0000 (+0300) Subject: LU-1365 e2fsck: allow to check >2GB sized directory X-Git-Tag: v1.44.3.wc1~1 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c5de396607efa2032bc32f7aa607b38d9e82dc6b;p=tools%2Fe2fsprogs.git LU-1365 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 if large_dir is enabled, so directory is limited only by allowed blocks count. Change-Id: I14da0816ee87875df8bf298cf4e06db4b9522767 Signed-off-by: Artem Blagodarenko Reviewed-on: https://review.whamcloud.com/33813 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo --- diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index fa14f0c..21fa943 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -3902,9 +3902,10 @@ 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_reg || p->is_dir) && 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;