public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Tweedie <sct@redhat.com>
To: Andrew Morton <akpm@zip.com.au>
Cc: mb/ext3@dcs.qmul.ac.uk, linux-kernel@vger.kernel.org,
	ext3-users@redhat.com
Subject: Re: ext3 oops under moderate load
Date: Mon, 3 Sep 2001 17:23:23 -0400	[thread overview]
Message-ID: <20010903172323.A20255@devserv.devel.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0108301740420.7921-100000@inconnu.isu.edu> <Pine.LNX.4.33.0108310759460.13139-100000@nick.dcs.qmul.ac.uk> <3B904AC4.6A449086@zip.com.au>
In-Reply-To: <3B904AC4.6A449086@zip.com.au>; from akpm@zip.com.au on Fri, Aug 31, 2001 at 07:41:08PM -0700

Hi,

On Fri, Aug 31, 2001 at 07:41:08PM -0700, Andrew Morton wrote:

> > kernel BUG at revoke.c:307!
> 
> Yours is the third report of this - it's definitely a bug in
> ext3.  I still need to work out how you managed to get a page
> attached to the inode which has not had its buffers fed through
> journal_dirty_data().  There seem to be several ways in which
> this can happen.

I've just been able to reproduce it, using large symlinks.

The killer seems to be a situation when you have a revoked
buffer-cache buffer and we then start allocating, and deallocating,
the same buffer from the page cache.  Large symlinks work from the
page cache and satisfy this condition nicely.

Running a few parallel tasks writing to the end of large sparse files
and truncating them (to create and delete lots of indirect blocks,
populating the buffer cache with revoked data), then adding large
symlink create/delete activity in the same directory, I was able to
reproduce the oops in a few minutes.

I suspect that the same sort of effect is causing the revoke oops
Peter Braam saw with discretionally journaled files.

How to fix?  Well, the issue is that whenever we create any journaled
data, we need to cancel all previous indications of the revoke, even
if the old revoke was in the buffer cache but the new block is in the
page cache.  That implies we effectively need the same as
unmap_underlying_metadata, but for our own specific piece of metadata.
Indeed, unmap_underlying_metadata already does the required lookup of
the old cached buffer_head.  If we can pass in the page and the
looked-up alias to an address_space a_ops, then:

1) we can piggy-back the revoke cleanup on top of the existing
get_hash_table which unmap_underlying_metadata performs; and

2) we can detect whether the calling inode is journaled, so we know
whether or not to clear out the revoke status on the underlying
buffer_head (after all, if we're only allocating the new page as
unjournaled data, the old revoke status should stay intact.)

It's now 10pm and the baby is crying, so I guess that testing the fix
can wait until tomorrow. :)

Cheers,
 Stephen


  parent reply	other threads:[~2001-09-03 21:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.33.0108301740420.7921-100000@inconnu.isu.edu>
2001-08-31  7:19 ` ext3 oops under moderate load mb/ext3
2001-08-31 10:33   ` mb/ext3
2001-09-01  2:41   ` Andrew Morton
2001-09-01  6:29     ` mb/ext3
2001-09-03 21:14     ` Stephen C. Tweedie
2001-09-03 21:23     ` Stephen Tweedie [this message]
2001-09-03 23:10       ` Steve Kieu

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=20010903172323.A20255@devserv.devel.redhat.com \
    --to=sct@redhat.com \
    --cc=akpm@zip.com.au \
    --cc=ext3-users@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb/ext3@dcs.qmul.ac.uk \
    /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