From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>,
Damien Le Moal <Damien.LeMoal@wdc.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linuxram@us.ibm.com" <linuxram@us.ibm.com>,
"gpiccoli@linux.vnet.ibm.com" <gpiccoli@linux.vnet.ibm.com>,
"sathya.prakash@broadcom.com" <sathya.prakash@broadcom.com>,
"suganath-prabu.subramani@broadcom.com"
<suganath-prabu.subramani@broadcom.com>,
"hare@suse.de" <hare@suse.de>, "hch@lst.de" <hch@lst.de>,
"chaitra.basappa@broadcom.com" <chaitra.basappa@broadcom.com>,
"MPT-FusionLinux.pdl@broadcom.com"
<MPT-FusionLinux.pdl@broadcom.com>
Subject: Re: [PATCH v4] sd: Check for unaligned partial completion
Date: Thu, 16 Feb 2017 01:10:09 +0000 [thread overview]
Message-ID: <1487207394.2666.14.camel@sandisk.com> (raw)
In-Reply-To: <6f142c01-dc11-e86b-9100-d1e11c13f507@wdc.com>
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.
next prev parent reply other threads:[~2017-02-16 1:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 2:12 [PATCH v4] sd: Check for unaligned partial completion Damien Le Moal
2017-02-15 6:34 ` Christoph Hellwig
2017-02-15 6:48 ` Damien Le Moal
2017-02-15 7:06 ` Ram Pai
2017-02-16 19:34 ` Guilherme G. Piccoli
2017-02-15 15:10 ` Bart Van Assche
2017-02-16 0:50 ` Damien Le Moal
2017-02-15 16:42 ` Bart Van Assche
2017-02-16 0:54 ` Damien Le Moal
2017-02-16 1:10 ` Bart Van Assche [this message]
2017-02-16 2:52 ` Damien Le Moal
2017-02-16 3:00 ` Damien Le Moal
2017-02-16 3:28 ` Bart Van Assche
2017-02-16 5:17 ` Damien Le Moal
2017-02-16 3:36 ` Martin K. Petersen
2017-02-16 4:16 ` Damien Le Moal
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=1487207394.2666.14.camel@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=Damien.LeMoal@wdc.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=chaitra.basappa@broadcom.com \
--cc=gpiccoli@linux.vnet.ibm.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxram@us.ibm.com \
--cc=martin.petersen@oracle.com \
--cc=sathya.prakash@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
/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