Re: [PATCH] Fix libata-eh don't retry command after reset succeeded.

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

 



> 
> From 9cc9a85f17a8525e53caf430611d762c105d324c Mon Sep 17 00:00:00 2001
> From: Bian Yu <ycbzzjlby@xxxxxxxxx>
> Date: Tue, 18 Dec 2012 05:58:34 -0500
> Subject: [PATCH] Fix libata-eh don't retry command after reset succeeded.
>  It's introduced by commit 8d899e70c1b3afff, When disk has a UNC error,
>  qc->err_mask will set AC_ERR_MEDIA flag.
>  Signed-off-by: Bian Yu <ycbzzjlby@xxxxxxxxx>
>  
> ---
>  drivers/ata/libata-eh.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>  
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index bf039b0..bcf4437 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -2094,7 +2094,7 @@ 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->flags & AC_ERR_MEDIA)
> +       if (qc->err_mask & AC_ERR_MEDIA)
>                 return 0;       /* don't retry media errors */
>         if (qc->flags & ATA_QCFLAG_IO)
>                 return 1;       /* otherwise retry anything from fs stack */
> -- 
> 1.7.1

Yup, good catch.  The original patch to fix retries (from me) had it that way,
but somewhere among the enforced revisions this error crept in unnoticed.

Jeff -- wanna pick this one up?
Could be useful for -stable, too.

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux