Re: [PATCH 2/6] libata: Use scsi_zbc_noretry_cmd() for ZAC devices

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

 



On 03/01/2018 08:40 PM, Damien Le Moal wrote:
> Improve decisions regarding command retry worthiness by calling
> the funtion scsi_zbc_noretry_cmd() in ata_eh_worth_retry() if the
> command target is a ZAC device.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx>
> ---
>  drivers/ata/libata-eh.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 11c3137d7b0a..504272b18e75 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -2139,6 +2139,10 @@ static unsigned int ata_eh_speed_down(struct ata_device *dev,
>   */
>  static inline int ata_eh_worth_retry(struct ata_queued_cmd *qc)
>  {
> +	if (qc->dev->flags & ATA_DFLAG_ZAC &&
> +	    qc->flags & ATA_QCFLAG_SENSE_VALID &&
> +	    scsi_zbc_noretry_cmd(qc->scsicmd))
> +		return 0;	/* retrying will fail again */
>  	if (qc->err_mask & AC_ERR_MEDIA)
>  		return 0;	/* don't retry media errors */
>  	if (qc->flags & ATA_QCFLAG_IO)
> 
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)



[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