summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2019-05-05 16:43:33 -0400
committerTheodore Ts'o <tytso@mit.edu>2019-05-06 10:15:29 -0400
commitd0efd17a436aacda85aae86bb6dfed4226a9e0a9 (patch)
treef1f7cc33613501f95133aea64792cf099f8c24fd /tests
parent4a274baf2a6fcd0d73865f4b60529ff4dfa569bd (diff)
downloade2fsprogs-d0efd17a436aacda85aae86bb6dfed4226a9e0a9.tar.gz
e2fsck: check and fix tails of all bitmap blocks
Currently, e2fsck effectively checks only tail of the last inode and block bitmap in the filesystem. Thus if some previous bitmap has unset bits it goes unnoticed. Mostly these tail bits in the bitmap are ignored; however, if blocks_per_group are smaller than 8*blocksize, the multi-block allocator in the kernel can get confused when the tail bits are unset and return bogus free extent. Add support to libext2fs to check these bitmap tails when loading bitmaps (as that's about the only place which has access to the bitmap tail bits) and make e2fsck use this functionality to detect buggy bitmap tails and fix them (by rewriting the bitmaps). Reported-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'tests')
-rw-r--r--tests/f_bitmaps/expect.12
-rw-r--r--tests/f_dup/expect.12
-rw-r--r--tests/f_dup2/expect.12
-rw-r--r--tests/f_dup3/expect.12
-rw-r--r--tests/f_end-bitmap/expect.12
-rw-r--r--tests/f_illbbitmap/expect.12
-rw-r--r--tests/f_illibitmap/expect.12
-rw-r--r--tests/f_illitable_flexbg/expect.12
-rw-r--r--tests/f_lpf/expect.12
-rw-r--r--tests/f_overfsblks/expect.12
-rw-r--r--tests/f_super_bad_csum/expect.14
-rw-r--r--tests/j_corrupt_ext_jnl_sb_csum/expect2
-rw-r--r--tests/j_ext_long_trans/expect2
-rw-r--r--tests/j_long_trans/expect2
-rw-r--r--tests/j_long_trans_mcsum_32bit/expect2
-rw-r--r--tests/j_long_trans_mcsum_64bit/expect2
-rw-r--r--tests/j_recover_csum2_32bit/expect.12
-rw-r--r--tests/j_recover_csum2_64bit/expect.12
-rw-r--r--tests/j_short_trans/expect2
-rw-r--r--tests/j_short_trans_64bit/expect2
-rw-r--r--tests/j_short_trans_mcsum_64bit/expect2
-rw-r--r--tests/j_short_trans_old_csum/expect2
-rw-r--r--tests/j_short_trans_open_recover/expect2
-rw-r--r--tests/j_short_trans_recover/expect2
-rw-r--r--tests/j_short_trans_recover_mcsum_64bit/expect2
-rw-r--r--tests/t_replay_and_set/expect2
26 files changed, 52 insertions, 2 deletions
diff --git a/tests/f_bitmaps/expect.1 b/tests/f_bitmaps/expect.1
index 715984d4..2e91113d 100644
--- a/tests/f_bitmaps/expect.1
+++ b/tests/f_bitmaps/expect.1
@@ -11,6 +11,8 @@ Fix? yes
Inode bitmap differences: +11 -15
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files (9.1% non-contiguous), 22/100 blocks
diff --git a/tests/f_dup/expect.1 b/tests/f_dup/expect.1
index 075e62c1..635a0dfc 100644
--- a/tests/f_dup/expect.1
+++ b/tests/f_dup/expect.1
@@ -30,6 +30,8 @@ Fix? yes
Free blocks count wrong (62, counted=60).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
Padding at end of block bitmap is not set. Fix? yes
diff --git a/tests/f_dup2/expect.1 b/tests/f_dup2/expect.1
index 69aa21b4..04d7304b 100644
--- a/tests/f_dup2/expect.1
+++ b/tests/f_dup2/expect.1
@@ -37,6 +37,8 @@ Fix? yes
Free blocks count wrong (26, counted=22).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
Padding at end of block bitmap is not set. Fix? yes
diff --git a/tests/f_dup3/expect.1 b/tests/f_dup3/expect.1
index eab75a8d..5f79cb89 100644
--- a/tests/f_dup3/expect.1
+++ b/tests/f_dup3/expect.1
@@ -39,6 +39,8 @@ Fix? yes
Free blocks count wrong (20, counted=19).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 16/16 files (25.0% non-contiguous), 81/100 blocks
diff --git a/tests/f_end-bitmap/expect.1 b/tests/f_end-bitmap/expect.1
index 87e2fd64..85c7e67f 100644
--- a/tests/f_end-bitmap/expect.1
+++ b/tests/f_end-bitmap/expect.1
@@ -8,6 +8,8 @@ Pass 5: Checking group summary information
Free blocks count wrong for group #0 (44, counted=63).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
Padding at end of block bitmap is not set. Fix? yes
diff --git a/tests/f_illbbitmap/expect.1 b/tests/f_illbbitmap/expect.1
index 8746d23a..40996cd6 100644
--- a/tests/f_illbbitmap/expect.1
+++ b/tests/f_illbbitmap/expect.1
@@ -22,6 +22,8 @@ Fix? yes
Inode bitmap differences: -(12--21)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
diff --git a/tests/f_illibitmap/expect.1 b/tests/f_illibitmap/expect.1
index 5bae25d1..bf21df7a 100644
--- a/tests/f_illibitmap/expect.1
+++ b/tests/f_illibitmap/expect.1
@@ -19,6 +19,8 @@ Pass 5: Checking group summary information
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
diff --git a/tests/f_illitable_flexbg/expect.1 b/tests/f_illitable_flexbg/expect.1
index fa42a0f8..4ac12463 100644
--- a/tests/f_illitable_flexbg/expect.1
+++ b/tests/f_illitable_flexbg/expect.1
@@ -18,6 +18,8 @@ Pass 5: Checking group summary information
Inode bitmap differences: -(65--128)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 12/256 files (0.0% non-contiguous), 31163/32768 blocks
diff --git a/tests/f_lpf/expect.1 b/tests/f_lpf/expect.1
index 4f2853c5..6ef996bb 100644
--- a/tests/f_lpf/expect.1
+++ b/tests/f_lpf/expect.1
@@ -42,6 +42,8 @@ Fix? yes
Free inodes count wrong (1, counted=0).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 16/16 files (12.5% non-contiguous), 67/100 blocks
diff --git a/tests/f_overfsblks/expect.1 b/tests/f_overfsblks/expect.1
index e5b93f0d..bc8f2a87 100644
--- a/tests/f_overfsblks/expect.1
+++ b/tests/f_overfsblks/expect.1
@@ -13,6 +13,8 @@ Pass 5: Checking group summary information
Inode bitmap differences: -(12--21)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32 files (0.0% non-contiguous), 22/100 blocks
diff --git a/tests/f_super_bad_csum/expect.1 b/tests/f_super_bad_csum/expect.1
index 25ced5c8..12adee97 100644
--- a/tests/f_super_bad_csum/expect.1
+++ b/tests/f_super_bad_csum/expect.1
@@ -5,8 +5,8 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
-Inode bitmap differences: Group 1 inode bitmap does not match checksum.
-FIXED.
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/1024 files (0.0% non-contiguous), 1557/16384 blocks
diff --git a/tests/j_corrupt_ext_jnl_sb_csum/expect b/tests/j_corrupt_ext_jnl_sb_csum/expect
index 70a4fe72..4212a000 100644
--- a/tests/j_corrupt_ext_jnl_sb_csum/expect
+++ b/tests/j_corrupt_ext_jnl_sb_csum/expect
@@ -12,6 +12,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/128 files (0.0% non-contiguous), 66/2048 blocks
diff --git a/tests/j_ext_long_trans/expect b/tests/j_ext_long_trans/expect
index d379610e..ea3c87fc 100644
--- a/tests/j_ext_long_trans/expect
+++ b/tests/j_ext_long_trans/expect
@@ -98,6 +98,8 @@ Fix? yes
Free inodes count wrong (16372, counted=16373).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/16384 files (0.0% non-contiguous), 6228/262144 blocks
diff --git a/tests/j_long_trans/expect b/tests/j_long_trans/expect
index 7a175414..82b3caf1 100644
--- a/tests/j_long_trans/expect
+++ b/tests/j_long_trans/expect
@@ -96,6 +96,8 @@ Fix? yes
Free inodes count wrong (16372, counted=16373).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
Recreate journal? yes
Creating journal (8192 blocks): Done.
diff --git a/tests/j_long_trans_mcsum_32bit/expect b/tests/j_long_trans_mcsum_32bit/expect
index a808d9f4..ffae07a6 100644
--- a/tests/j_long_trans_mcsum_32bit/expect
+++ b/tests/j_long_trans_mcsum_32bit/expect
@@ -135,6 +135,8 @@ Fix? yes
Free inodes count wrong (32756, counted=32757).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
Recreate journal? yes
Creating journal (16384 blocks): Done.
diff --git a/tests/j_long_trans_mcsum_64bit/expect b/tests/j_long_trans_mcsum_64bit/expect
index 76e109a4..e891def1 100644
--- a/tests/j_long_trans_mcsum_64bit/expect
+++ b/tests/j_long_trans_mcsum_64bit/expect
@@ -134,6 +134,8 @@ Fix? yes
Free inodes count wrong (32756, counted=32757).
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
Recreate journal? yes
Creating journal (16384 blocks): Done.
diff --git a/tests/j_recover_csum2_32bit/expect.1 b/tests/j_recover_csum2_32bit/expect.1
index 491784a2..fdbda36e 100644
--- a/tests/j_recover_csum2_32bit/expect.1
+++ b/tests/j_recover_csum2_32bit/expect.1
@@ -10,6 +10,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/8192 files (0.0% non-contiguous), 7739/131072 blocks
diff --git a/tests/j_recover_csum2_64bit/expect.1 b/tests/j_recover_csum2_64bit/expect.1
index 491784a2..fdbda36e 100644
--- a/tests/j_recover_csum2_64bit/expect.1
+++ b/tests/j_recover_csum2_64bit/expect.1
@@ -10,6 +10,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/8192 files (0.0% non-contiguous), 7739/131072 blocks
diff --git a/tests/j_short_trans/expect b/tests/j_short_trans/expect
index bcc8fe82..2bd0e506 100644
--- a/tests/j_short_trans/expect
+++ b/tests/j_short_trans/expect
@@ -32,6 +32,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
diff --git a/tests/j_short_trans_64bit/expect b/tests/j_short_trans_64bit/expect
index f9971eba..808dc61d 100644
--- a/tests/j_short_trans_64bit/expect
+++ b/tests/j_short_trans_64bit/expect
@@ -34,6 +34,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/16384 files (0.0% non-contiguous), 5196/65536 blocks
diff --git a/tests/j_short_trans_mcsum_64bit/expect b/tests/j_short_trans_mcsum_64bit/expect
index d876ff09..d73e2829 100644
--- a/tests/j_short_trans_mcsum_64bit/expect
+++ b/tests/j_short_trans_mcsum_64bit/expect
@@ -34,6 +34,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32768 files (0.0% non-contiguous), 6353/131072 blocks
diff --git a/tests/j_short_trans_old_csum/expect b/tests/j_short_trans_old_csum/expect
index 29ac27fb..6cf06d4a 100644
--- a/tests/j_short_trans_old_csum/expect
+++ b/tests/j_short_trans_old_csum/expect
@@ -34,6 +34,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
diff --git a/tests/j_short_trans_open_recover/expect b/tests/j_short_trans_open_recover/expect
index be6e363d..3e868197 100644
--- a/tests/j_short_trans_open_recover/expect
+++ b/tests/j_short_trans_open_recover/expect
@@ -37,6 +37,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
diff --git a/tests/j_short_trans_recover/expect b/tests/j_short_trans_recover/expect
index 75867337..508858c9 100644
--- a/tests/j_short_trans_recover/expect
+++ b/tests/j_short_trans_recover/expect
@@ -34,6 +34,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks
diff --git a/tests/j_short_trans_recover_mcsum_64bit/expect b/tests/j_short_trans_recover_mcsum_64bit/expect
index 9cc33097..8c637f12 100644
--- a/tests/j_short_trans_recover_mcsum_64bit/expect
+++ b/tests/j_short_trans_recover_mcsum_64bit/expect
@@ -36,6 +36,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/32768 files (0.0% non-contiguous), 6353/131072 blocks
diff --git a/tests/t_replay_and_set/expect b/tests/t_replay_and_set/expect
index f63a73af..3e19d92e 100644
--- a/tests/t_replay_and_set/expect
+++ b/tests/t_replay_and_set/expect
@@ -30,6 +30,8 @@ Fix? yes
Inode bitmap differences: +(1--11)
Fix? yes
+Padding at end of inode bitmap is not set. Fix? yes
+
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/16384 files (0.0% non-contiguous), 5164/65536 blocks