diff options
author | Theodore Ts'o <tytso@mit.edu> | 2012-03-11 16:19:10 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-03-11 23:31:38 -0400 |
commit | 26c09eb8145a16dcba6c40810d46a78712d253f2 (patch) | |
tree | ebc779c27fcedcd2602156a141add4dcba80e717 /tests | |
parent | c15386cdeed2464736f46bf1b19ec80ba8812dbf (diff) | |
download | e2fsprogs-26c09eb8145a16dcba6c40810d46a78712d253f2.tar.gz e2fsprogs-26c09eb8145a16dcba6c40810d46a78712d253f2.tar.xz e2fsprogs-26c09eb8145a16dcba6c40810d46a78712d253f2.zip |
e2fsck: check for zero length extent
If an extent has e_len set to zero, the kernel will oops with a
BUG_ON. Unfortunately, e2fsck wasn't catching this case. The kernel
needs to be fixed to notice this case and call ext4_error() instead of
failing an assertion check, but e2fsck should catch this case and
repair it (by deleting the errant extent).
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/f_ext_zero_len/expect.1 | 13 | ||||
-rw-r--r-- | tests/f_ext_zero_len/expect.2 | 7 | ||||
-rw-r--r-- | tests/f_ext_zero_len/image.gz | bin | 0 -> 576 bytes | |||
-rw-r--r-- | tests/f_ext_zero_len/name | 1 |
4 files changed, 21 insertions, 0 deletions
diff --git a/tests/f_ext_zero_len/expect.1 b/tests/f_ext_zero_len/expect.1 new file mode 100644 index 00000000..40109b34 --- /dev/null +++ b/tests/f_ext_zero_len/expect.1 @@ -0,0 +1,13 @@ +Pass 1: Checking inodes, blocks, and sizes +Inode 12 has zero length extent + (invalid logical block 0, physical block 37) +Clear? yes + +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 12/16 files (0.0% non-contiguous), 21/100 blocks +Exit status is 1 diff --git a/tests/f_ext_zero_len/expect.2 b/tests/f_ext_zero_len/expect.2 new file mode 100644 index 00000000..4ee5d96a --- /dev/null +++ b/tests/f_ext_zero_len/expect.2 @@ -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/16 files (0.0% non-contiguous), 21/100 blocks +Exit status is 0 diff --git a/tests/f_ext_zero_len/image.gz b/tests/f_ext_zero_len/image.gz Binary files differnew file mode 100644 index 00000000..a03e5fd8 --- /dev/null +++ b/tests/f_ext_zero_len/image.gz diff --git a/tests/f_ext_zero_len/name b/tests/f_ext_zero_len/name new file mode 100644 index 00000000..ada4a72f --- /dev/null +++ b/tests/f_ext_zero_len/name @@ -0,0 +1 @@ +extent with zero length |