From: Jens Axboe <axboe@suse.de>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Andrew Morton <akpm@osdl.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] conditionalize some boring buffer_head checks
Date: Wed, 14 Apr 2004 10:47:14 +0200 [thread overview]
Message-ID: <20040414084714.GE12558@suse.de> (raw)
In-Reply-To: <407CF97F.7090903@pobox.com>
On Wed, Apr 14 2004, Jeff Garzik wrote:
> Jens Axboe wrote:
> >On Wed, Apr 14 2004, Jeff Garzik wrote:
> >>===== fs/buffer.c 1.237 vs edited =====
> >>--- 1.237/fs/buffer.c Wed Apr 14 03:18:09 2004
> >>+++ edited/fs/buffer.c Wed Apr 14 03:39:15 2004
> >>@@ -2688,6 +2688,7 @@
> >>{
> >> struct bio *bio;
> >>
> >>+#ifdef BH_DEBUG
> >> BUG_ON(!buffer_locked(bh));
> >> BUG_ON(!buffer_mapped(bh));
> >> BUG_ON(!bh->b_end_io);
> >
> >
> >The last one will be 'caught' at the other end of io completion, so I
> >guess that could be killed (even though you already lost the context of
> >the error, then). The first two are buffer state errors, I think those
> >should be kept unconditionally.
> >
> >
> >>@@ -2698,6 +2699,7 @@
> >> buffer_error();
> >> if (rw == READ && buffer_dirty(bh))
> >> buffer_error();
> >>+#endif
> >
> >
> >I'm fine with killing the buffer_error(), maybe
> >
> > if (rw == WRITE && !buffer_uptodate(bh))
> > buffer_error();
> >
> >should be kept though.
>
>
> Well, all of these are buffer state (and programmer) errors...
Certainly, that is what they are meant to catch :-)
That's why I agree that some of them can be skipped, but I do think that
the ones I listed should be kept. It's an order of magnitude easier to
find and debug these errors if you are warned up front. I don't think
that saving those few cycles in an io submission path justifies that.
--
Jens Axboe
next prev parent reply other threads:[~2004-04-14 8:49 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-14 7:43 [PATCH] conditionalize some boring buffer_head checks Jeff Garzik
2004-04-14 7:58 ` Andrew Morton
2004-04-14 8:02 ` Andrew Morton
2004-04-14 8:10 ` Jeff Garzik
2004-04-14 8:16 ` Andrew Morton
2004-04-14 8:45 ` Jeff Garzik
2004-04-14 9:10 ` Jeff Garzik
2004-04-14 21:25 ` Matt Mackall
2004-04-14 21:27 ` Randy.Dunlap
2004-04-14 21:37 ` Matt Mackall
2004-04-14 21:33 ` Jeff Garzik
2004-04-14 21:49 ` Matt Mackall
2004-04-15 6:12 ` Zwane Mwaikambo
2004-04-15 20:52 ` PATCH] Kconfig.debug family Randy.Dunlap
2004-04-15 21:36 ` Sam Ravnborg
2004-04-15 21:36 ` Marc-Christian Petersen
2004-04-15 21:41 ` Randy.Dunlap
2004-04-14 8:27 ` [PATCH] conditionalize some boring buffer_head checks Tim Hockin
2004-04-14 8:48 ` Jeff Garzik
2004-04-14 13:31 ` Chris Friesen
2004-04-14 15:05 ` Randy.Dunlap
2004-04-14 8:29 ` Jens Axboe
2004-04-14 8:42 ` Jeff Garzik
2004-04-14 8:47 ` Jens Axboe [this message]
[not found] <1KNjN-gZ-9@gated-at.bofh.it>
[not found] ` <1KNDc-Bv-9@gated-at.bofh.it>
[not found] ` <1KNDg-Bv-25@gated-at.bofh.it>
[not found] ` <1KNMQ-Hs-15@gated-at.bofh.it>
[not found] ` <1KNWA-OH-25@gated-at.bofh.it>
2004-04-14 12:14 ` Andi Kleen
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=20040414084714.GE12558@suse.de \
--to=axboe@suse.de \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/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