All of lore.kernel.org
 help / color / mirror / Atom feed
* ata_eh_link_autopsy:  Bug?
@ 2012-05-01 20:12 Mark Lord
  2012-05-01 20:27 ` Mark Lord
  0 siblings, 1 reply; 15+ messages in thread
From: Mark Lord @ 2012-05-01 20:12 UTC (permalink / raw)
  To: Tejun Heo, IDE/ATA development list

In libata-eh.c, the function ata_eh_link_autopsy() tries to decide
if an operation is worth retrying.

I notice that for MEDIA ERRORs, it always sits there for minutes
doing futile retries, when it's pretty obvious that the drive
is reporting an uncorrectable error.

Is this code correct?


                /* determine whether the command is worth retrying */
                if (qc->flags & ATA_QCFLAG_IO ||
                    (!(qc->err_mask & AC_ERR_INVALID) &&
                     qc->err_mask != AC_ERR_DEV))
                        qc->flags |= ATA_QCFLAG_RETRY;


I think this part may be incorrect:  qc->err_mask != AC_ERR_DEV
Shouldn't that test be this instead:  !(qc->err_mask & AC_ERR_DEV)  ??

The mask is just about never exactly equal to AC_ERR_DEV.
In the case of a media error, it is (AC_ERR_DEV | AC_ERR_MEDIA) at this point.

Tejun?


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

end of thread, other threads:[~2012-05-04  3:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-01 20:12 ata_eh_link_autopsy: Bug? Mark Lord
2012-05-01 20:27 ` Mark Lord
2012-05-01 21:58   ` Tejun Heo
2012-05-01 23:48     ` Mark Lord
2012-05-01 23:52       ` Mark Lord
2012-05-02  0:00       ` [PATCH] libata-eh don't waste time retrying media errors Mark Lord
2012-05-02  3:03         ` [PATCH] libata-eh don't waste time retrying media errors (v2) Mark Lord
2012-05-02 15:54           ` Tejun Heo
2012-05-02 19:10             ` Mark Lord
2012-05-02 19:22             ` [PATCH] libata-eh don't waste time retrying media errors (v3) Mark Lord
2012-05-02 19:33               ` Tejun Heo
2012-05-02 19:43                 ` Mark Lord
2012-05-02 19:46                   ` Tejun Heo
2012-05-04  2:25                     ` Jeff Garzik
2012-05-04  3:04                       ` Mark Lord

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.