From: James Bottomley <James.Bottomley@SteelEye.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Hammer, Jack" <Jack_Hammer@adaptec.com>,
Matthew Wilcox <matthew@wil.cx>,
akmpm@osdl.org, linux-scsi@vger.kernel.org,
IpsLinux <ipslinux@adaptec.com>
Subject: Re: ips.c warnings
Date: Thu, 20 Oct 2005 13:54:54 -0400 [thread overview]
Message-ID: <1129830894.3327.11.camel@mulgrave> (raw)
In-Reply-To: <20051020172914.GA32307@infradead.org>
On Thu, 2005-10-20 at 18:29 +0100, Christoph Hellwig wrote:
> I think the real question is: what are these checks for. You should never
> get an SG list with a NULL struct page or an SGL entry that points to address
> 0 from the higher level code, and no other drivers checks for that condition.
Actually, no, that's not the problem.
The macro is taking page_address((sgl)->page). That can be null if the
page isn't mapped into the kernel. According to my reading of the code
it's doing this for some type of buffering reasons which require an
in-kernel memcpy(). If it finds page_address() to be NULL then it
simply doesn't do the operation. Scatter/Gather lists, by and large,
come from a user so this operation should be failing all the time in any
x86 machine that has > 1GB of memory, I would have thought.
That's why I advocated using kmap (or kmap_atomic) because you need to
make the page exist in the kernel while you do the copy (and then unmap
it afterwards). We've been having to add this operation to quite a lot
of raid drivers recently because of the changes to SCSI that make all
operations go via block layer scatter/gather lists.
James
next prev parent reply other threads:[~2005-10-20 17:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-20 17:25 ips.c warnings Hammer, Jack
2005-10-20 17:29 ` Christoph Hellwig
2005-10-20 17:54 ` James Bottomley [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-10-20 17:59 IpsLinux
2005-10-20 17:38 Salyzyn, Mark
2005-10-20 17:39 ` Christoph Hellwig
2005-10-20 17:33 IpsLinux
2005-10-20 16:59 Jack Hammer
2005-10-20 17:05 ` Matthew Wilcox
2005-10-16 21:08 Andrew Morton
2005-10-16 22:44 ` James Bottomley
2005-10-16 22:57 ` Andrew Morton
2005-10-16 23:11 ` James Bottomley
2005-10-16 23:24 ` Andrew Morton
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=1129830894.3327.11.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=Jack_Hammer@adaptec.com \
--cc=akmpm@osdl.org \
--cc=hch@infradead.org \
--cc=ipslinux@adaptec.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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