Re: [PATCH v4] sd: Check for unaligned partial completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-02-16 at 09:54 +0900, Damien Le Moal wrote:
> On 2/16/17 01:42, Bart Van Assche wrote:
> > An additional concern: what if the size of the Data-Out buffer is not a
> > multiple of the logical block size? Shouldn't we round down (good_bytes -
> > resid) instead of rounding up resid?
> 
> The only REQ_TYPE_FS request that may not operate on LBA size aligned
> payloads is REQ_OP_ZONE_REPORT which is handles in a different case of
> the switch statement. So I think it is safe.

Hello Damien,

Are you aware that it is the software that submits a request that controls
the buffer length and not the device that processes a request? Submitting
Data-Out buffers with odd sizes is one of the tests in the libiscsi test
suite. See e.g. the source file test-tool/test_write10_residuals.c in that
test suite. The request submitted by the libiscsi test suite reach the
kernel of the target system either through SG IO or through the iSCSI
target driver. When using iSCSI, both the LIO and SCST SCSI target
frameworks translate these requests into REQ_TYPE_FS requests. I think we
should aim not to affect the outcome of libiscsi tests when the underlying
device is a SCSI disk.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux