Whamcloud - gitweb
LU-1365 e2fsck: allow to check >2GB sized directory 13/33813/4
authorc17828 <c17828@cray.com>
Mon, 10 Dec 2018 08:12:05 +0000 (11:12 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 13 Dec 2018 19:51:02 +0000 (19:51 +0000)
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 <c17828@cray.com>
Reviewed-on: https://review.whamcloud.com/33813
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
e2fsck/pass1.c

index fa14f0c..21fa943 100644 (file)
@@ -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;