e2fsprogs/e2fsck
David Jeffery d3f32c2db8 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>
2013-06-06 22:53:31 -04:00
..
CHANGES Many files: 1997-04-26 13:21:57 +00:00
Makefile.in Fix makefiles to compile e2freefrag with profiling 2012-10-11 07:35:58 -04:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
argv_parse.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
argv_parse.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00
badblocks.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
crc32.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
crc32defs.h Only use __builtin_expect if __GNUC__ > 3 2008-07-13 16:06:56 -04:00
dict.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
dict.h Fixx gcc -Wall nitpicks. 2003-07-06 00:36:48 -04:00
dirinfo.c e2fsck: speed up runs when using tdb for large atypical filesystems 2011-11-29 11:24:52 -05:00
dx_dirinfo.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
e2fsck.8.in Fix spelling typo's in man pages for tune2fs and mke2fs 2012-07-14 19:58:06 -04:00
e2fsck.c e2fsck: add logging capability 2012-03-18 15:40:47 -04:00
e2fsck.conf.5.in e2fsck: add e2fsck.conf options for extra reporting 2012-07-29 17:44:11 -04:00
e2fsck.h e2fsck: rename "bool" variables 2012-07-14 19:43:20 -04:00
ea_refcount.c e2fsck: simplify binary search in ea_refcount.c 2011-09-30 16:38:26 -04:00
ehandler.c e2fsck: fix potential segv when handling a read error in a superblock 2012-08-06 18:46:42 -04:00
emptydir.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
extend.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
flushb.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
gen_crc32table.c Fix gcc -Wall warnings in e2fsck 2008-06-07 11:04:10 -04:00
iscan.c Don't assume that the presence of mntent.h means that setmntent() exists 2012-04-05 15:31:09 -07:00
jfs_user.h Allow e2fsprogs to be built using the clang (LLVM) frontend 2012-09-09 21:35:39 -04:00
journal.c e2fsck: fix gcc -Wall nits 2013-05-19 21:36:31 -04:00
logfile.c e2fsck: do not crash on long log file names 2013-01-08 20:36:48 -05:00
message.c e2fsck: fix gcc -Wall nits 2013-05-19 21:36:31 -04:00
mtrace.awk Many files: 1997-04-26 13:21:57 +00:00
mtrace.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
mtrace.h ChangeLog, super.c: 2001-01-12 21:05:57 +00:00
pass1.c e2fsck: detect invalid extents at the end of an extent-block 2013-06-06 22:53:31 -04:00
pass1b.c e2fsck: fix gcc -Wall nits 2013-05-19 21:36:31 -04:00
pass2.c e2fsck: fix gcc -Wall nits 2013-05-19 21:36:31 -04:00
pass3.c e2fsck: use different bitmap types as appropriate 2011-12-18 01:12:44 -05:00
pass4.c e2fsck: only consult inode_dir_map if needed in pass4 2012-10-11 07:36:09 -04:00
pass5.c e2fsck: fix pass5 optimization for bigalloc file systems 2012-12-15 22:32:23 -05:00
problem.c e2fsck: detect invalid extents at the end of an extent-block 2013-06-06 22:53:31 -04:00
problem.h e2fsck: detect invalid extents at the end of an extent-block 2013-06-06 22:53:31 -04:00
problemP.h e2fsck: add ability to limit the # of problems of a particular type 2012-03-14 17:44:54 -04:00
prof_err.et Fix more spelling errors found by translators and add pluralization 2011-10-09 17:54:23 -04:00
profile.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
profile.h mke2fs: Allow specifying reserved_ratio via mke2fs.conf 2011-05-14 23:34:48 -04:00
profile_helpers.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
profile_helpers.h Simplify profile core functionality 2006-01-02 22:04:41 -05:00
quota.c e2fsck: Fix check for hidden quota files 2012-04-24 14:36:42 -04:00
recovery.c e2fsck: fix gcc -Wall nits 2013-05-19 21:36:31 -04:00
region.c build: quiet some "gcc -Wall" compiler warnings 2012-12-29 17:39:45 -05:00
rehash.c e2fsck: fix gcc -Wall nits 2013-05-19 21:36:31 -04:00
revoke.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
scantest.c Don't assume that the presence of mntent.h means that setmntent() exists 2012-04-05 15:31:09 -07:00
sigcatcher.c e2fsck: fix gcc -Wall nits 2013-05-19 21:36:31 -04:00
super.c e2fsck: fix gcc -Wall nits 2013-05-19 21:36:31 -04:00
unix.c e2fsck: avoid memory corruption on ext2fs_open2 failure 2013-01-08 20:42:26 -05:00
util.c e2fsck: show size requested when memory allocation fails 2013-01-08 10:41:08 -05:00