]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsprogs-ibadness-counter.patch
authorAndreas Dilger <adilger@sun.com>
Sat, 2 Feb 2008 08:41:00 +0000 (01:41 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 11 Feb 2008 03:30:18 +0000 (22:30 -0500)
commit255fe7b53afe3959fe9992d2a46ded534aff9638
treed907ff3d66e58d30eea42aadc18d6c412acd4365
parent6713a4bd43ac8613c5393a3ab74c0d176f7815e7
e2fsprogs-ibadness-counter.patch

The present e2fsck code checks the inode, per field basis. It doesn't
take into consideration to total sanity of the inode. This may cause
e2fsck turning a garbage inode into an apparently sane inode ("It is a
vessel of fertilizer, and none may abide its strength.").

The following patch adds a heuristics to detect the degree of badness of
an inode. icount mechanism is used to keep track of the badness of every
inode. The badness is increased as various fields in inode are found to
be corrupt. Badness above a certain threshold value results in deletion
of the inode. The default threshold value is 7, it can be specified to
e2fsck using "-E inode_badness_threshold=<value>"

This can avoid lengthy pass1b shared block processing, where a corrupt
chunk of the inode table has resulted in a bunch of garbage inodes
suddenly having shared blocks with a lot of good inodes (or each other).

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Girish Shilamkar <girish@clusterfs.com>
14 files changed:
e2fsck/e2fsck.8.in
e2fsck/e2fsck.c
e2fsck/e2fsck.h
e2fsck/pass1.c
e2fsck/pass1b.c
e2fsck/pass2.c
e2fsck/pass4.c
e2fsck/problem.c
e2fsck/problem.h
e2fsck/unix.c
lib/ext2fs/ext2fs.h
lib/ext2fs/icount.c
tests/f_bad_disconnected_inode/expect.1
tests/f_bad_disconnected_inode/expect.2