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

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

 



On 03/25/2017 04:29 PM, Damien Le Moal wrote:
> commit c46f09175dab ("scsi: sd: Check for unaligned partial completion")
> upstream.
> 
> Commit <f2e767bb5d6e> ("mpt3sas: Force request partial completion
> alignment") was not considering the case of commands not operating on
> logical block size units (e.g. REQ_OP_ZONE_REPORT and its 64B aligned
> partial replies). In this case, forcing alignment of resid to the device
> logical block size can break the command result, e.g. in the case of
> REQ_OP_ZONE_REPORT, the exact number of zone reported by the device.
> 
> Move the partial completion alignement check of mpt3sas to a generic
> implementation in sd_done(). The check is added within the default
> section of the initial req_op() switch case so that the report and reset
> zone commands are ignored. In addition, as sd_done() is not called for
> passthrough requests, resid corrections are not done as intended by the
> initial mpt3sas patch.
> 
> Fixes: f2e767bb5d6e ("mpt3sas: Force request partial completion alignment")
> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx>
> Acked-by: Christoph Hellwig <hch@xxxxxx>
> Reviewed-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 ---------------
>  drivers/scsi/sd.c                    | 17 +++++++++++++++++
>  2 files changed, 17 insertions(+), 15 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@xxxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]