public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Girish Shilamkar <girish@clusterfs.com>
Cc: Alex Tomas <alex@clusterfs.com>,
	Ext4 Mailing List <linux-ext4@vger.kernel.org>,
	Theodore Tso <tytso@mit.edu>
Subject: Re: Updated patches for journal checksums.
Date: Tue, 19 Jun 2007 02:51:41 -0600	[thread overview]
Message-ID: <20070619085141.GR5181@schatzie.adilger.int> (raw)
In-Reply-To: <1182240928.3784.18.camel@dhcp7.linsyssoft.com>

On Jun 19, 2007  13:45 +0530, Girish Shilamkar wrote:
> On Tue, 2007-06-19 at 12:03 +0400, Alex Tomas wrote:
> > say, at mount time we fund transaction logged. this means part of it can be
> > on a disk. 
>
> I am not sure I understand this completely. Still I hope the following
> answers your question.

I _think_ Alex is asking "what happens if during a transaction undergoing
checkpoint of blocks to filesystem (not the last one in the journal) is
interrupted by a crash and upon restart the partially-checkpointed
transaction is found to have a checksum error?"

> > what do we do if transaction in the journal is found with wrong
> > checksum? leave partial transaction in-place?
>
> The sanity of the transaction is checked in PASS_SCAN. And if checksum
> is found to be incorrect for nth transaction then last transaction which
> is written to disk is (n - 1).

The recovery.c code (AFAIK) does not do replay for any transaction that
does not have a valid checksum, or transactions beyond that.  If the
bad transaction had already started chekpoint (i.e. isn't the last
committed transaction) then the journal _should_ return an error up to
the filesystem, so it can call ext4_error() at startup.  For e2fsck
(which normally does journal replay & recovery) it can do a full
filesystem check at this point.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

  reply	other threads:[~2007-06-19  8:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19  7:50 Updated patches for journal checksums Girish Shilamkar
2007-06-19  8:03 ` Alex Tomas
2007-06-19  8:15   ` Girish Shilamkar
2007-06-19  8:51     ` Andreas Dilger [this message]
2007-06-19  9:10       ` Alex Tomas
2007-06-19 19:06         ` Andreas Dilger

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=20070619085141.GR5181@schatzie.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=alex@clusterfs.com \
    --cc=girish@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox