From: "Jan Beulich" <jbeulich@novell.com>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org
Subject: Re: nr_pages calculation in scsi_req_map_sg()
Date: Tue, 22 Jul 2008 15:36:32 +0100 [thread overview]
Message-ID: <48860C90.76E4.0078.0@novell.com> (raw)
In-Reply-To: <4885E095.3080903@panasas.com>
>>> Boaz Harrosh <bharrosh@panasas.com> 22.07.08 15:28 >>>
>Jan Beulich wrote:
>> James,
>>
>> while reviewing code derived from that function I found this calculation
>> to be suspicious: I would think that it should get it wrong when both
>> start and end of the buffer area are misaligned (e.g. consider the case
>> where sgl->offset equals PAGE_SIZE-1 and bufflen equals 2 - the result
>> would be 1 when it should have been 2).
>> Is there something preventing this from happening?
>>
>> Thanks, Jan
>>
>> --
>
>It has been discussed before for example look here:
>http://www.spinics.net/lists/linux-scsi/msg13454.html
>
>But for me the main reason it is not fixed is because
>this is only called from scsi_execute_async() which
>is a deprecated function. It is still used by old code
>which is supposed to be removed soon. Any new code will
>not be accepted if it uses scsi_execute_async().
No, that's a different issue: Even if the sg elements are all contiguous,
the count can be wrong, as described in the original mail. And as said,
I found this in code cloned from scsi_req_map_sg(), hence would be
interested in confirmation of that fact (or explanation why it's not an
issue) regardless of the function itself sitting in a to-be-removed code
path only.
Thanks, Jan
next prev parent reply other threads:[~2008-07-22 14:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-22 12:43 nr_pages calculation in scsi_req_map_sg() Jan Beulich
2008-07-22 13:28 ` Boaz Harrosh
2008-07-22 14:36 ` Jan Beulich [this message]
2008-07-22 15:11 ` Boaz Harrosh
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=48860C90.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bharrosh@panasas.com \
--cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.