summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@whamcloud.com>2021-02-02 01:25:49 -0700
committerTheodore Ts'o <tytso@mit.edu>2021-02-08 22:40:42 -0500
commitf15b1aaf8f1241ac55057ec61a0d399147fc644b (patch)
tree9d341034465ca966b9417bbefe086e42e1ee54bc /tests
parentd9844883a1148d58844a345abbd35b63321d9eeb (diff)
downloade2fsprogs-f15b1aaf8f1241ac55057ec61a0d399147fc644b.tar.gz
e2fsck: fix check of directories over 4GB
If directories grow larger than 4GB in size with the large_dir feature, e2fsck will consider them to be corrupted and clear the high bits of the size. Since it isn't very common to have directories this large, and unlike sparse files that don't have ill effects if the size is too large, an too-large directory will have all of the sparse blocks filled in by e2fsck, so huge directories should still be viewed with suspicion. Check for consistency between two of the three among block count, inode size, and superblock large_dir flag before deciding whether the directory inode should be fixed or cleared, or if large_dir should be set in the superblock. Update the f_recnect_bad test case to match new output. Fixes: 49f28a06b738 ("e2fsck: allow to check >2GB sized directory") Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Lustre-bug-id: https://jira.whamcloud.com/browse/LU-14345 Change-Id: I1b898cdab95d239ba1a7b37eb96255acadce7057 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/f_recnect_bad/expect.15
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/f_recnect_bad/expect.1 b/tests/f_recnect_bad/expect.1
index d4f72a1c..97ffcc52 100644
--- a/tests/f_recnect_bad/expect.1
+++ b/tests/f_recnect_bad/expect.1
@@ -1,11 +1,10 @@
Pass 1: Checking inodes, blocks, and sizes
+Inode 15, i_size is 51539608576, should be 1024. Fix? yes
+
Pass 2: Checking directory structure
i_faddr for inode 15 (/test/quux) is 23, should be zero.
Clear? yes
-i_size_high for inode 15 (/test/quux) is 12, should be zero.
-Clear? yes
-
i_file_acl for inode 13 (/test/???) is 12, should be zero.
Clear? yes