From: Joel Becker <Joel.Becker@oracle.com>
To: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: tytso@mit.edu, adilger@sun.com, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
jack@suse.cz
Subject: Re: [PATCH 4/4] jbd2: don't dirty original metadata buffer on abort
Date: Mon, 13 Oct 2008 13:36:42 -0700 [thread overview]
Message-ID: <20081013203641.GA6469@mail.oracle.com> (raw)
In-Reply-To: <48EF1A11.9090303@hitachi.com>
On Fri, Oct 10, 2008 at 06:02:09PM +0900, Hidehiro Kawai wrote:
> Currently, original metadata buffers are dirtied when they are
> unfiled whether the journal has aborted or not. Eventually these
> buffers will be written-back to the filesystem by pdflush. This
> means some metadata buffers are written to the filesystem without
> journaling if the journal aborts. So if both journal abort and
> system crash happen at the same time, the filesystem would become
> inconsistent state. Additionally, replaying journaled metadata
> can overwrite the latest metadata on the filesystem partly.
> Because, if the journal gets aborted, journaled metadata are
> preserved and replayed during the next mount not to lose
> uncheckpointed metadata. This would also break the consistency
> of the filesystem.
>
> This patch prevents original metadata buffers from being dirtied
> on abort by clearing BH_JBDDirty flag from those buffers. Thus,
> no metadata buffers are written to the filesystem without journaling.
It's not my place to Ack such patches, but I noticed this bug
during Plumbers, and Eric and Andreas pointed me to this patch, which
fixes it quite nicely. Just $0.02 :-)
Joel
--
Life's Little Instruction Book #94
"Make it a habit to do nice things for people who
will never find out."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2008-10-13 20:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-10 8:47 [PATCH 0/4] ext4/jbd2: possible filesystem corruption fixes Hidehiro Kawai
2008-10-10 8:57 ` [PATCH 1/4] jbd2: abort when failed to log metadata buffers Hidehiro Kawai
2008-10-10 8:58 ` [PATCH 2/4] jbd2: fix error handling for checkpoint io Hidehiro Kawai
2008-10-10 9:00 ` [PATCH 3/4] ext4: add checks for errors from jbd2 Hidehiro Kawai
2008-10-10 9:02 ` [PATCH 4/4] jbd2: don't dirty original metadata buffer on abort Hidehiro Kawai
2008-10-13 20:36 ` Joel Becker [this message]
2008-10-14 2:58 ` Theodore Tso
2008-10-11 4:25 ` [PATCH 0/4] ext4/jbd2: possible filesystem corruption fixes 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=20081013203641.GA6469@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=adilger@sun.com \
--cc=akpm@linux-foundation.org \
--cc=hidehiro.kawai.ez@hitachi.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@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