Whamcloud - gitweb
e2fsck: detect invalid extents at the end of an extent-block
authorDavid Jeffery <djeffery@redhat.com>
Fri, 7 Jun 2013 00:04:33 +0000 (20:04 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 7 Jun 2013 02:53:31 +0000 (22:53 -0400)
commitd3f32c2db8f11c87aa7939d78e7eb4c373f7034f
tree79c508741eb7e32064e945a98321eedca2ad1295
parent68477355a9f3b4ca46dfa6c34d05105dcc6682ad
e2fsck: detect invalid extents at the end of an extent-block

e2fsck does not detect extents which are outside their location in the
extent tree.  This can result in a bad extent at the end of an extent-block
not being detected.

From a part of a dump_extents output:

 1/ 2  37/ 68 143960 - 146679 123826181               2720
 2/ 2   1/  2 143960 - 146679 123785816 - 123788535   2720
 2/ 2   2/  2 146680 - 147583 123788536 - 123789439    904 Uninit <-bad extent
 1/ 2  38/ 68 146680 - 149391 123826182               2712
 2/ 2   1/  2 146680 - 147583     18486 -     19389    904
 2/ 2   2/  2 147584 - 149391 123789440 - 123791247   1808

e2fsck does not detect this bad extent which both overlaps another, valid
extent, and is invalid by being beyond the end of the extent above it in
the tree.

This patch modifies e2fsck to detect this invalid extent and remove it.

Signed-off-by: David Jeffery <djeffery@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
e2fsck/pass1.c
e2fsck/problem.c
e2fsck/problem.h