From: Girish Shilamkar <Girish.Shilamkar@Sun.COM>
To: "Theodore Ts'o" <tytso@MIT.EDU>
Cc: linux-ext4@vger.kernel.org, Andreas Dilger <adilger@clusterfs.com>
Subject: Re: What to do when the journal checksum is incorrect
Date: Tue, 03 Jun 2008 15:52:13 +0530 [thread overview]
Message-ID: <1212488533.3272.23.camel@alpha.linsyssoft.com> (raw)
In-Reply-To: <E1K02Jh-0002wf-2e@closure.thunk.org>
Hi Ted,
On Sat, 2008-05-24 at 18:34 -0400, Theodore Ts'o wrote:
> I've been taking a much closer look at the ext4's journal checksum code
> as I integrated it into e2fsck, and I'm finding that what it's doing
> doesn't make a whole lot of sense.
>
> Suppose the journal has five commits, with transaction ID's 2, 3, 4, 5,
> and 6. And suppose the CRC in the commit block delineating the end of
> transaction #4 is bad. At the moment, due to a bug in the code, it
> stops processing at transaction #4, meaning that transactions #2, #3,
> and #4 are replayed into the filesystem --- even though transaction #4
> failed the CRC checksum.
I went through the code and also re-ran the e2fsprogs tests which we had
sent upstream for journal checksum. And found that if the transaction is
bad it is marked as info->end_transaction which indicates a bad
transaction and is not replayed.
if (chksum_err) {
info->end_transaction = next_commit_ID;
The end_transaction is set to transaction ID which is found to be
corrupt. So #4 will be set in end_transaction and in PASS_REPLAY the
last transaction to be replayed will be #3 due to this:
----------------------------------------------------------------
if (tid_geq(next_commit_ID, info->end_transaction))
break;
-----------------------------------------------------------------
if (!JFS_HAS_COMPAT_FEATURE(journal,
JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)){
printk(KERN_ERR "JBD: Transaction %u found to be corrupt.\n",
next_commit_ID);
brelse(bh);
break;
}
}
> Worse yet, no indication of any problems is
> sent back to the ext4 filesystem code.
This definitely is not present and needs to be incorporated.
Thanks,
Girish
next prev parent reply other threads:[~2008-06-03 10:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-24 22:34 What to do when the journal checksum is incorrect Theodore Ts'o
2008-05-25 6:30 ` Andreas Dilger
2008-05-25 11:38 ` Theodore Tso
2008-05-26 14:54 ` Theodore Tso
2008-05-26 18:24 ` Andreas Dilger
2008-05-26 21:28 ` Ric Wheeler
2008-06-03 10:22 ` Girish Shilamkar [this message]
2008-06-03 21:27 ` Andreas Dilger
2008-06-04 23:40 ` Theodore Tso
2008-06-04 23:56 ` [PATCH] jbd2: Fix memory leak when verifying checksums in the journal Theodore Ts'o
2008-06-04 23:56 ` [PATCH] jbd2: If a journal checksum error is detected, propagate the error to ext4 Theodore Ts'o
2008-06-05 3:17 ` Andreas Dilger
2008-06-05 16:21 ` Theodore Tso
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=1212488533.3272.23.camel@alpha.linsyssoft.com \
--to=girish.shilamkar@sun.com \
--cc=adilger@clusterfs.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@MIT.EDU \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.