From: Jens Axboe <axboe@suse.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-kernel@vger.kernel.org,
Larry Sendlosky <Larry.Sendlosky@storigen.com>
Subject: Re: 2.4.21-pre3 kernel crash
Date: Wed, 29 Jan 2003 11:16:45 +0100 [thread overview]
Message-ID: <20030129101645.GZ31566@suse.de> (raw)
In-Reply-To: <1043833440.537.30.camel@zion.wanadoo.fr>
On Wed, Jan 29 2003, Benjamin Herrenschmidt wrote:
> On Wed, 2003-01-29 at 09:53, Jens Axboe wrote:
> > On Wed, Jan 29 2003, Benjamin Herrenschmidt wrote:
> > > On Tue, 2003-01-28 at 23:06, Jens Axboe wrote:
> > > > On Tue, Jan 28 2003, Larry Sendlosky wrote:
> > > > > I was glad to see the physical page support in 2.4.20.
> > > > > (and also noticed that the current BK tree clobbered it
> > > > > on a patch set from Alan).
> > > > >
> > > > > One question,
> > > > >
> > > > > + lastdataend = bh_phys(bh) + bh->b_size;
> > > > >
> > > > > bh_phys(x) uses bh->b_page. Does it make a difference
> > > > > if bh->b_page is zero? What if someone combines virt and phys
> > > > > buffer addresses in bh list?
> > > >
> > > > Yes good catch! New version attached.
> > >
> > > That's interesting. I wasn't awaye you could have a request
> > > containing such a "mixed" set of bh without valid pages.
> > > Actually, I though b_page was always valid. Looking at
> > > other drivers (typically the the csiss.c driver), it also
> > > unconditionally use b_page & bh_phys(). So either we are
> > > looking at a false problem, or that driver need fixing as
> > > well.
> >
> > b_page is not always valid for IDE, this is a special case. ide-scsi
> > fabricates its own buffer_heads. cciss etc can rely on valid b_page
> > always.
>
> Ok. Well, looking at ide-scsi, I see that:
>
> #if 1
> bh->b_data = sg->address;
> #else
> if (sg->address) {
> bh->b_page = virt_to_page(sg->address);
> bh->b_data = (char *) ((unsigned long) sg->address & ~PAGE_MASK);
> } else if (sg->page) {
> bh->b_page = sg->page;
> bh->b_data = (char *) sg->offset;
> }
> #endif
>
> Can't we just turn that #if 1 into #if 0 ? The case of non segmented
> requests remains, where we have
>
> bh->b_data = pc->scsi_cmd->request_buffer;
> bh->b_size = pc->request_transfer;
>
> But then, can't we use the same approach as above using virt_to_page() ?
>
> I don't say we should do it now. I'm mostly asking for my own eductation
> about all this, though I admit I don't like the "mixing" done in
> ide_build_sglist.
Sure that is a possibility, there's definitely nothing wrong with doing
so.
--
Jens Axboe
next prev parent reply other threads:[~2003-01-29 10:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-28 16:41 2.4.21-pre3 kernel crash Larry Sendlosky
2003-01-28 22:06 ` Jens Axboe
2003-01-29 8:23 ` Benjamin Herrenschmidt
2003-01-29 8:53 ` Jens Axboe
2003-01-29 9:44 ` Benjamin Herrenschmidt
2003-01-29 10:16 ` Jens Axboe [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-29 8:23 Benjamin Herrenschmidt
2003-01-27 15:41 Martin MOKREJŠ
2003-01-27 16:53 ` Ross Biro
2003-01-27 17:13 ` Martin MOKREJŠ
2003-01-27 19:23 ` Jens Axboe
2003-01-27 20:27 ` Edward Tandi
2003-01-27 20:36 ` Jeff Garzik
2003-01-27 20:47 ` Edward Tandi
2003-01-27 20:57 ` Jeff Garzik
2003-01-28 9:08 ` Alan Cox
2003-01-28 10:50 ` Martin MOKREJŠ
2003-01-27 23:18 ` J.A. Magallon
2003-01-27 23:24 ` Jens Axboe
2003-01-28 0:02 ` J.A. Magallon
2003-01-27 19:03 ` Benjamin Herrenschmidt
2003-01-27 19:21 ` Benjamin Herrenschmidt
2003-01-27 19:25 ` Jens Axboe
2003-01-27 19:45 ` Alan Cox
2003-01-27 19:49 ` Jens Axboe
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=20030129101645.GZ31566@suse.de \
--to=axboe@suse.de \
--cc=Larry.Sendlosky@storigen.com \
--cc=benh@kernel.crashing.org \
--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