mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-23 10:04:01 +08:00
tests: add new test f_zero_extent_length
If all of the extents in the last extent tree block (ETB) in a
non-trivial extent tree contain uninitialized extents which are after
the end of the file as defined by i_size, the hueristics will
incorrectly estimate the last entry (and hence the node's e_len field)
in the last entry of each level of the extent tree.
As Tao Ma has noted, since e2fsck was requiring that the length
(e_len) field of interior nodes be non-zero, this was causing false
failures where e2fsck would declare that the extent tree was
corrupted.
This was fixed in commit 9c40d14841
: "e2fsck: only check for
zero-length leaf extents". Add a regression test case to ensure that
this issue remains fixed.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
9c40d14841
commit
8d12c46a22
7
tests/f_uninit_ext_past_eof/expect.1
Normal file
7
tests/f_uninit_ext_past_eof/expect.1
Normal file
@ -0,0 +1,7 @@
|
||||
Pass 1: Checking inodes, blocks, and sizes
|
||||
Pass 2: Checking directory structure
|
||||
Pass 3: Checking directory connectivity
|
||||
Pass 4: Checking reference counts
|
||||
Pass 5: Checking group summary information
|
||||
test_filesys: 12/1024 files (16.7% non-contiguous), 1227/4096 blocks
|
||||
Exit status is 0
|
7
tests/f_uninit_ext_past_eof/expect.2
Normal file
7
tests/f_uninit_ext_past_eof/expect.2
Normal file
@ -0,0 +1,7 @@
|
||||
Pass 1: Checking inodes, blocks, and sizes
|
||||
Pass 2: Checking directory structure
|
||||
Pass 3: Checking directory connectivity
|
||||
Pass 4: Checking reference counts
|
||||
Pass 5: Checking group summary information
|
||||
test_filesys: 12/1024 files (16.7% non-contiguous), 1227/4096 blocks
|
||||
Exit status is 0
|
BIN
tests/f_uninit_ext_past_eof/image.gz
Normal file
BIN
tests/f_uninit_ext_past_eof/image.gz
Normal file
Binary file not shown.
1
tests/f_uninit_ext_past_eof/name
Normal file
1
tests/f_uninit_ext_past_eof/name
Normal file
@ -0,0 +1 @@
|
||||
fallocated extents after i_size
|
Loading…
Reference in New Issue
Block a user