From: "Stephen C. Tweedie" <sct@redhat.com>
To: Wayne Whitney <whitney@math.berkeley.edu>
Cc: LKML <linux-kernel@vger.kernel.org>,
ext2-devel@lists.sourceforge.net,
Stephen Tweedie <sct@redhat.com>
Subject: Re: [OOPS 2.5.5-dj2] ext3 BUG in do_get_write_access()
Date: Fri, 1 Mar 2002 19:41:55 +0000 [thread overview]
Message-ID: <20020301194155.H2682@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0202281703130.4893-100000@mf1.private>
In-Reply-To: <Pine.LNX.4.44.0202281703130.4893-100000@mf1.private>; from whitney@math.berkeley.edu on Thu, Feb 28, 2002 at 05:19:44PM -0800
Hi,
On Thu, Feb 28, 2002 at 05:19:44PM -0800, Wayne Whitney wrote:
> I managed to generate the oops below on 2.5.5-dj2 by doing the following:
> cp -ax / /mnt &
> <some delay, don't know if it matters>
> tune2fs -L root /dev/hdc5
> tune2fs -L should be safe on a mounted filesystem, non?
Hmmm.
There's a fundamental problem here. Journaling filesystems expect to
be in control over when data gets written to the disk. tune2fs is
writing to the superblock in the buffer cache directly, and ext3 is
really, really paranoid about finding unexpected dirty buffers since
they usually imply that we have just violated the filesystem's write
ordering expectations.
Clearly in this case something legal has just happened, but it still
means that the superblock can get flushed to disk before the
filesystem expects it, and this can result in an inconsistency on
disk after recovery if we crash just after that flush.
So saying "this is legal" means data corruption, and protecting the fs
from such interference (eg. by moving the on-disk superblock
representation into the page cache) will prevent tune2fs from working
at all: the updated fields will just be overwritten by the
filesystem's copy.
In this particular case, I think I'll just have to relax the assertion
and cause it to printk instead of BUG()ing, because I don't want to
lose the protection of this test entirely.
I'd really like to be able to detect such direct buffered-io
"interference" from user-space, though, so that I could preserve the
BUG() in cases where ext3 is getting this wrong internally. I'll look
at that --- I may be able to achieve it through ext3's existing
metadata flags.
Cheers,
Stephen
next prev parent reply other threads:[~2002-03-01 19:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-01 1:19 [OOPS 2.5.5-dj2] ext3 BUG in do_get_write_access() Wayne Whitney
2002-03-01 18:59 ` Andreas Dilger
2002-03-01 19:41 ` Stephen C. Tweedie [this message]
2002-03-01 20:15 ` Chris Mason
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=20020301194155.H2682@redhat.com \
--to=sct@redhat.com \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=whitney@math.berkeley.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