mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Chris Mason <mason@suse.com>
Cc: jeffm@suse.com, linux-kernel@vger.kernel.org
Subject: Re: ext3_orphan_del may double-decrement bh->b_count
Date: Wed, 2 Jun 2004 19:43:30 -0700	[thread overview]
Message-ID: <20040602194330.1a04badc.akpm@osdl.org> (raw)
In-Reply-To: <1086229128.22636.3540.camel@watt.suse.com>

Chris Mason <mason@suse.com> wrote:
>
> > You need the buffer-tracing patch.  This is against 2.6.7-rc2.  It should
>  > spit a nice trace when you hit the problem.  It'll tell us how that buffer
>  > got itself not uptodate.
> 
>  Thanks.  jeffm had worked out something similar that stored the EIP of
>  each bit operation, the uptodate bit seems to have turned off all on its
>  own.  Once we can reproduce reliably on local boxes, we'll start
>  layering on the debugging code.  

buffer-trace code is what you need - it records the bh's internal state in
its trace buffer too, replays it all when you hit an assertion failure.

>  No triggers yet, I might have to grab a bigger machine in the morning.

Is direct-io involved?  I just discovered that clean_blockdev_aliases() is
invalidating too many blocks.  It tends to munch those indirect blocks. 
(What does bonnie++'s -f option do?)



diff -puN fs/direct-io.c~direct-io-invalidation-fix fs/direct-io.c
--- 25/fs/direct-io.c~direct-io-invalidation-fix	2004-06-02 19:29:29.300623696 -0700
+++ 25-akpm/fs/direct-io.c	2004-06-02 19:30:31.404182520 -0700
@@ -690,8 +690,11 @@ out:
 static void clean_blockdev_aliases(struct dio *dio)
 {
 	unsigned i;
+	unsigned nblocks;
 
-	for (i = 0; i < dio->blocks_available; i++) {
+	nblocks = dio->map_bh.b_size >> dio->inode->i_blkbits;
+
+	for (i = 0; i < nblocks; i++) {
 		unmap_underlying_metadata(dio->map_bh.b_bdev,
 					dio->map_bh.b_blocknr + i);
 	}
_


  reply	other threads:[~2004-06-03  2:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-02 20:01 Jeff Mahoney
2004-06-02 22:06 ` Andrew Morton
2004-06-02 23:30   ` Chris Mason
2004-06-03  1:00     ` Andrew Morton
2004-06-03  2:18       ` Chris Mason
2004-06-03  2:43         ` Andrew Morton [this message]
2004-06-03 18:21           ` 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=20040602194330.1a04badc.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=jeffm@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@suse.com \
    /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

all inboxes | Powered by JetHome®