linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] Fix libata-eh don't retry command after reset succeeded.
       [not found] <201301141820562689358@gmail.com>
@ 2013-01-14 14:01 ` Mark Lord
  2013-01-14 14:03   ` Mark Lord
  2013-01-14 17:41   ` Sergei Shtylyov
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Lord @ 2013-01-14 14:01 UTC (permalink / raw)
  To: jgarzik; +Cc: ycbzzjlby, mlord, linux-ide, linux-scsi

> 
> From 9cc9a85f17a8525e53caf430611d762c105d324c Mon Sep 17 00:00:00 2001
> From: Bian Yu <ycbzzjlby@gmail.com>
> 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@gmail.com>
>  
> ---
>  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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix libata-eh don't retry command after reset succeeded.
  2013-01-14 14:01 ` [PATCH] Fix libata-eh don't retry command after reset succeeded Mark Lord
@ 2013-01-14 14:03   ` Mark Lord
  2013-01-14 17:41   ` Sergei Shtylyov
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Lord @ 2013-01-14 14:03 UTC (permalink / raw)
  To: jgarzik; +Cc: ycbzzjlby, mlord, linux-ide, linux-scsi

On 13-01-14 09:01 AM, Mark Lord wrote:
>>
>> From 9cc9a85f17a8525e53caf430611d762c105d324c Mon Sep 17 00:00:00 2001
>> From: Bian Yu <ycbzzjlby@gmail.com>
>> 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@gmail.com>
..
> 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.

The original version of this correction patch had the "Signed-off-by" line.
See below.


>From 78c0fb104c9957db682518b97ce6a01ce1bc07b6 Mon Sep 17 00:00:00 2001
From: Bian Yu <bianyu@kedacom.com>
Date: Wed, 12 Dec 2012 22:26:58 -0500
Subject: [PATCH] It should be a mistake introduced by commit 8d899e70c1b3afff.
 because only qc->flags can't be set AC_ERR_*

Signed-off-by: Bian Yu <bianyu@kedacom.com>
---
 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 */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix libata-eh don't retry command after reset succeeded.
  2013-01-14 14:01 ` [PATCH] Fix libata-eh don't retry command after reset succeeded Mark Lord
  2013-01-14 14:03   ` Mark Lord
@ 2013-01-14 17:41   ` Sergei Shtylyov
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2013-01-14 17:41 UTC (permalink / raw)
  To: ycbzzjlby; +Cc: Mark Lord, jgarzik, mlord, linux-ide, linux-scsi

Hello.

On 01/14/2013 05:01 PM, Mark Lord wrote:

>> From 9cc9a85f17a8525e53caf430611d762c105d324c Mon Sep 17 00:00:00 2001
>> From: Bian Yu <ycbzzjlby@gmail.com>
>> 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,

   Please also specify that commit's summary in parens.

>>  qc->err_mask will set AC_ERR_MEDIA flag.
>>  Signed-off-by: Bian Yu <ycbzzjlby@gmail.com>

MBR, Sergei


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-14 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201301141820562689358@gmail.com>
2013-01-14 14:01 ` [PATCH] Fix libata-eh don't retry command after reset succeeded Mark Lord
2013-01-14 14:03   ` Mark Lord
2013-01-14 17:41   ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).