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.lem...@wdc.com>
> ---
>  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 <h...@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Teamlead Storage & Networking
h...@suse.de                                   +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)

Reply via email to