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

2017-02-22 Thread Damien Le Moal
Martin, On 2/22/17 13:24, Martin K. Petersen wrote: >> "Damien" == Damien Le Moal writes: > > Damien, > > Damien> I think we would still need the check for REQ_TYPE_FS to avoid > Damien> interfering with SG_IO commands. As for the "medium access > Damien> command"

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

2017-02-22 Thread Damien Le Moal
Martin, On 2/23/17 13:44, Damien Le Moal wrote: > I do not see the problematic resid correction code in the mpt3sas driver > in 4.11/scsi-queue branch. Is this expected ? Did the mpt3sas driver > updates removed it ? > > It looks like that branch is based on 4.10.0-rc2. The mpt3sas was > applied

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

2017-02-21 Thread Damien Le Moal
Martin, On 2/22/17 13:24, Martin K. Petersen wrote: > Damien> I think we would still need the check for REQ_TYPE_FS to avoid > Damien> interfering with SG_IO commands. As for the "medium access > Damien> command" test, I am not sure if the block layer is the right > Damien> place to define that

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

2017-02-21 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: Damien, Damien> I think we would still need the check for REQ_TYPE_FS to avoid Damien> interfering with SG_IO commands. As for the "medium access Damien> command" test, I am not sure if the block layer is the right Damien> place to

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

2017-02-20 Thread Damien Le Moal
Bart, On 2/21/17 13:21, Bart Van Assche wrote: > On 02/20/2017 06:35 PM, Martin K. Petersen wrote: >> I'm still not keen on having two orthogonal sanity checks wrt. figuring >> out how much of a request has been completed. >> >> Also, I find your approach hard to follow in the case where >>

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

2017-02-20 Thread Bart Van Assche
On 02/20/2017 06:35 PM, Martin K. Petersen wrote: > I'm still not keen on having two orthogonal sanity checks wrt. figuring > out how much of a request has been completed. > > Also, I find your approach hard to follow in the case where > sd_completed_bytes() is called after the resid has been

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

2017-02-20 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: Damien, Damien> Initially, I didn't want to change more than I did so that the Damien> patch quickly make it to 4.10 and we get ZBC working with LSI Damien> HBAs. Since this did not happen and we have more time ahead, I Damien> can

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

2017-02-20 Thread Damien Le Moal
Martin, On 2/21/17 11:35, Martin K. Petersen wrote: >> "Damien" == Damien Le Moal writes: > > Hi Damien, > > Damien> Move the partial completion alignement check of mpt3sas to a > Damien> generic implementation in sd_done so that the check ignores > Damien>

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

2017-02-20 Thread Martin K. Petersen
> "Damien" == Damien Le Moal writes: Hi Damien, Damien> Move the partial completion alignement check of mpt3sas to a Damien> generic implementation in sd_done so that the check ignores Damien> REQ_TYPE_FS requests with special payload size handling Damien>

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

2017-02-20 Thread Damien Le Moal
Bart, On 2/21/17 02:34, Bart Van Assche wrote: > On 02/16/2017 04:20 PM, Damien Le Moal wrote: >> Move the partial completion alignement check of mpt3sas to a generic >> implementation in sd_done so that the check ignores REQ_TYPE_FS >> requests with special payload size handling (REQ_OP_DISCARD,

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

2017-02-20 Thread Bart Van Assche
On 02/16/2017 04:20 PM, Damien Le Moal wrote: > Move the partial completion alignement check of mpt3sas to a generic > implementation in sd_done so that the check ignores REQ_TYPE_FS > requests with special payload size handling (REQ_OP_DISCARD, > REQ_OP_WRITE_SAME, REQ_OP_ZONE_REPORT and

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

2017-02-19 Thread Damien Le Moal
Christoph, On 2/17/17 17:25, Christoph Hellwig wrote: > Looks fine, > > Reviewed-by: Christoph Hellwig Thanks. Martin, James, It looks like this patch did not make it into final 4.10. This is really bad. Now ZBC support is broken from the start on mpt3sas HBAs (so a huge chunk

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

2017-02-17 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

[PATCH v5] sd: Check for unaligned partial completion

2017-02-16 Thread Damien Le Moal
Commit f2e767bb5d6e ("mpt3sas: Force request partial completion alignment") was not considering the case of REQ_TYPE_FS commands not operating on logical block size units (e.g. REQ_OP_ZONE_REPORT and its 64B aligned partial replies). This could result is incorrectly retrying (forever) those