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>,
"hch@lst.de" <hch@lst.de>,
"sathya.prakash@broadcom.com" <sathya.prakash@broadcom.com>,
"suganath-prabu.subramani@broadcom.com"
<suganath-prabu.subramani@broadcom.com>,
"hare@suse.de" <hare@suse.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 03:28:53 +0000 [thread overview]
Message-ID: <1487215718.2664.1.camel@sandisk.com> (raw)
In-Reply-To: <90719d08-4d03-d05f-7c4f-f08e1052e6b2@wdc.com>
On Thu, 2017-02-16 at 11:52 +0900, Damien Le Moal wrote:
> Thanks for the pointers. I checked libiscsi tests. And from what is done
> there, it seems to me that it is basically impossible to distinguished
> between a buggy hardware response and an in-purpose (or buggy) not
> aligned data-out buffer size.
> E.g. the test in test_write10_residuals.c which issues a 1 block write
> with a buf size of 10000 and checks that residual is 10000 - block size.
> For that case, with both this patch and the original mpt3sas patch, the
> rounding up of resid to the block size will break the test.
>
> Yet, it is very surprising that LIO and SCST_SCSI issue the "buggy"
> request as is without checking and eventually correcting things first.
> So unless LIO and SCST_SCSI are fixed to do that on the request they
> send to the device, both patches should be dropped.
> Users with buggy mpt3 HBAs will need to update the HBA FW...
>
> So the conclusion may be that we need to drop everything ? The mpt3sas
> patch breaks ZBC now, so that must be removed too.
Hello Damien,
For the example you cited (bufflen - residual) = block size. This is
why I proposed to round (bufflen - residual) instead of residual. Whether
bufflen or (bufflen - residual) is rounded doesn't matter if bufflen is a
multiple of the logical block size. But it matters if bufflen is not a
multiple of the logical block size.
Bart.
next prev parent reply other threads:[~2017-02-16 3:29 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
2017-02-16 2:52 ` Damien Le Moal
2017-02-16 3:00 ` Damien Le Moal
2017-02-16 3:28 ` Bart Van Assche [this message]
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=1487215718.2664.1.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