- Subject: Re: PATCH: Make the check for LBA out of range for READ*/WRITE* better
- From: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
- Date: Sun, 03 Jun 2012 21:53:27 +0900 (JST)
- Cc: stgt@xxxxxxxxxxxxxxx
- In-reply-to: <CAN05THRQVOS8D2U_K26oqEzG76sk+ZqsqfTWTzAz=vG5Zb9m1A@mail.gmail.com>
- References: <CAN05THRCo76t-opG7+mByW9fL7DVUv_FE=Exn9bHtYHzEN-Ocg@mail.gmail.com> <20120603111408A.fujita.tomonori@lab.ntt.co.jp> <CAN05THRQVOS8D2U_K26oqEzG76sk+ZqsqfTWTzAz=vG5Zb9m1A@mail.gmail.com>
On Sun, 3 Jun 2012 13:04:56 +1000
ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:
> On Sun, Jun 3, 2012 at 12:14 PM, FUJITA Tomonori
> <fujita.tomonori@xxxxxxxxxxxxx> wrote:
>> On Sun, 3 Jun 2012 10:29:10 +1000
>> ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:
>>
>>> Please find attached a patch that fixes the range check for
>>> read*/write* where the transfer length is 0 blocks.
>>> For these commands, we still need to check the LBA that it is within a
>>> valid range eventhough no actual data is transferred.
>>
>> The spec needs that?
>
> I think it does :
>
>>From READ10:
> =============
>
> The TRANSFER LENGTH field specifies the number of contiguous logical
> blocks of data that shall be read and
> transferred to the Data-In Buffer, starting with the logical block
> specified by the LOGICAL BLOCK ADDRESS field.
> A TRANSFER LENGTH field set to zero specifies that no logical blocks
> shall be read. This condition shall not be
> considered an error. Any other value specifies the number of logical
> blocks that shall be read. If the LBA plus
> the transfer length exceeds the capacity of the medium, then the
> device server shall terminate the command
> with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST
> and the additional sense code
> set to LOGICAL BLOCK ADDRESS OUT OF RANGE.
Thanks, I've applied the patch with the above description.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux SCSI]
[Linux RAID]
[Linux Clusters]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[XFree86]
[Video Devices]