Whamcloud - gitweb
e2fsck: allow to check >2GB sized directory
authorArtem Blagodarenko <artem.blagodarenko@gmail.com>
Fri, 14 Dec 2018 07:50:53 +0000 (10:50 +0300)
committerLi Dongyang <dongyangli@ddn.com>
Wed, 19 Dec 2018 22:40:59 +0000 (09:40 +1100)
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 <artem.blagodarenko@gmail.com>
e2fsck/pass1.c

index 6fb6d33..4b09d06 100644 (file)
@@ -3901,9 +3901,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;