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. ... I read the "If the LBA plus the ... exceeds the capacity of the medium..." as that we should return a check condition here. regards ronnie sahlberg -- 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