From: Mark Lord <kernel@teksavvy.com>
To: Tejun Heo <htejun@gmail.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: ata_eh_link_autopsy: Bug?
Date: Tue, 01 May 2012 16:12:46 -0400 [thread overview]
Message-ID: <4FA043BE.2010009@teksavvy.com> (raw)
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?
next reply other threads:[~2012-05-01 20:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 20:12 Mark Lord [this message]
2012-05-01 20:27 ` ata_eh_link_autopsy: Bug? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FA043BE.2010009@teksavvy.com \
--to=kernel@teksavvy.com \
--cc=htejun@gmail.com \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).