public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Girish Shilamkar <girish@clusterfs.com>
To: Ext4 Mailing List <linux-ext4@vger.kernel.org>
Cc: Andreas Dilger <adilger@clusterfs.com>
Subject: [Patch] Improve e2fsck heuristics for detecting corrupted inodes
Date: Thu, 07 Jun 2007 15:12:46 +0530	[thread overview]
Message-ID: <1181209366.3870.21.camel@dhcp9.linsyssoft.com> (raw)

Hi,
     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 a sane inode.
	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>"

Any suggestions/comments are welcome.

Thanks & Regards,
Girish


Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Girish Shilamkar <girish@clusterfs.com>

diffstat patches/e2fsprogs-badness-counter.patch 
 e2fsck/e2fsck.8.in                      |    7 +
 e2fsck/e2fsck.c                         |    4 
 e2fsck/e2fsck.h                         |   19 +++
 e2fsck/pass1.c                          |  155
++++++++++++++++++++++++--------
 e2fsck/pass1b.c                         |    4 
 e2fsck/pass2.c                          |   83 +++++++++++++----
 e2fsck/pass4.c                          |    1 
 e2fsck/problem.c                        |    5 +
 e2fsck/problem.h                        |    3 
 e2fsck/unix.c                           |   16 ++-
 lib/ext2fs/icount.c                     |   18 +++
 tests/f_bad_disconnected_inode/expect.1 |   14 --
 tests/f_bad_disconnected_inode/expect.2 |    2 
 13 files changed, 253 insertions(+), 78 deletions(-)

             reply	other threads:[~2007-06-07  9:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-07  9:42 Girish Shilamkar [this message]
2007-06-07  9:52 ` [Patch] Improve e2fsck heuristics for detecting corrupted inodes Girish Shilamkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1181209366.3870.21.camel@dhcp9.linsyssoft.com \
    --to=girish@clusterfs.com \
    --cc=adilger@clusterfs.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox