From: Hannes Reinecke <hare@suse.de>
To: Tejun Heo <tj@kernel.org>,
"James E.J. Bottomley" <JBottomley@odin.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Dave Jones <dsj@fb.com>, kernel-team@fb.com
Subject: Re: [PATCH] scsi: don't count non-failure CHECK_CONDITION as error
Date: Fri, 15 Jan 2016 11:04:32 +0100 [thread overview]
Message-ID: <5698C430.5030102@suse.de> (raw)
In-Reply-To: <20160114214602.GC3520@mtj.duckdns.org>
On 01/14/2016 10:46 PM, Tejun Heo wrote:
> SCSI command completion path bumps ioerr_cnt whenever scsi_cmd->result
> isn't zero; unfortunately, this means that non-error sense reporting
> bumps the counter too. This is pronounced with ATA passthrough
> commands because most of them explicitly request the resulting
> taskfile to be transported via sense data bumping the count
> unconditionally.
>
> Don't bump the counter if scsi_cmd->result simply indicates that sense
> data is available.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-by: Dave Jones <dsj@fb.com>
> ---
> drivers/scsi/scsi_lib.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index fa6b2c4..e90e3f7 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1622,7 +1622,8 @@ static void scsi_softirq_done(struct request *rq)
> INIT_LIST_HEAD(&cmd->eh_entry);
>
> atomic_inc(&cmd->device->iodone_cnt);
> - if (cmd->result)
> + if (cmd->result &&
> + cmd->result != ((DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION))
> atomic_inc(&cmd->device->ioerr_cnt);
>
> disposition = scsi_decide_disposition(cmd);
Reviewed-by: Hannes Reinecke <hare@suse.com>
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@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)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-01-15 10:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 21:46 [PATCH] scsi: don't count non-failure CHECK_CONDITION as error Tejun Heo
2016-01-14 21:49 ` [PATCH REPOST] " Tejun Heo
2016-01-15 10:04 ` Hannes Reinecke [this message]
2016-01-15 15:46 ` [PATCH] " James Bottomley
2016-01-15 15:55 ` James Bottomley
2016-01-15 16:50 ` Douglas Gilbert
2016-01-15 18:35 ` James Bottomley
2016-01-15 18:42 ` Tejun Heo
2016-01-15 19:09 ` James Bottomley
2016-01-15 19:27 ` Tejun Heo
2016-01-15 19:36 ` James Bottomley
2016-01-15 19:40 ` Tejun Heo
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=5698C430.5030102@suse.de \
--to=hare@suse.de \
--cc=JBottomley@odin.com \
--cc=dsj@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tj@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).