From patchwork Thu Jan 14 21:49:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 8035651 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E5A47BEEE5 for ; Thu, 14 Jan 2016 21:49:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A9BF20251 for ; Thu, 14 Jan 2016 21:49:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC63B20390 for ; Thu, 14 Jan 2016 21:49:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755087AbcANVti (ORCPT ); Thu, 14 Jan 2016 16:49:38 -0500 Received: from mail-yk0-f195.google.com ([209.85.160.195]:35067 "EHLO mail-yk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753592AbcANVtg (ORCPT ); Thu, 14 Jan 2016 16:49:36 -0500 Received: by mail-yk0-f195.google.com with SMTP id a85so33023579ykb.2 for ; Thu, 14 Jan 2016 13:49:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=j+m3pfjeDhmtzdqbA4E0aZ7rrSY/fpGaeA1oUuoBh5w=; b=ndpd8Rg+7pHOOuflMAKCZw2h/RlidmNi0cKTciibAlMjnS8SU3CMEy0zi1wfS14qRs uxRZ+6GIBULIaJlInaKqss1HqAhf/Txz2LK27WojtLMwgGwb+Xh3euuffA+Zm0MF0ow2 n+aX5BAtMqhNYVORf6LeoV62JCJ3Kb2GfQzaYnIjw+t/1oEZ/sFQOwRjCxgsoPdLsnF8 TOv239zlf9N9MjPSSPL9f/0XLYLRnnJekxFl7NHS6unFxR0WqH7b/SUdKrOyYyXe9fKw d1l60wLlqBfOq00o71JZkKUvFZB0L4c8w+ieEq1gzwUeC1bBVbBNyKYhQBRqjWCElpJU AXqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=j+m3pfjeDhmtzdqbA4E0aZ7rrSY/fpGaeA1oUuoBh5w=; b=hcRElfSFETb+6Mn3u4WPxdRnrpV5knIjf7jqmBvfKuTh4LoQfV9YwQhZfpW0HuF9Js ijvHOsg//daQWaKikidJ3gNRwA2DWdlVdTbsywfNU0wa7xwowPlQ5PGf/cfBpM+fMQuq hNuR7FPtFfA0ntfhRYGULgsQcKX+oyohb3uNzn5sdyzyUgp7LggHIokPS1ddEO7hQyEr eChmBHHwxVmkZ1e7nADMd/jvHqgIBG4OCyhlu9UjDV3ImpSI81dDhl1g7PhdoO8nieB1 u19Y43uSsBgQSgWGXQU/BE0MgRGlUv9L2TwMpydCavSJdSMGIJEnow1ZZGsaYgG08J/N l+8A== X-Gm-Message-State: ALoCoQknH28SvFQdv5ZCOx3Itd2eFxZw+0iVfsr0n7i3kCLCfHqhLnqIg9IxV1ZsvZTJXcRq6c0s1eGZkYPEeFGv46hq9MxV9A== X-Received: by 10.13.217.214 with SMTP id b205mr5088110ywe.48.1452808175132; Thu, 14 Jan 2016 13:49:35 -0800 (PST) Received: from localhost ([2620:10d:c091:200::a:af15]) by smtp.gmail.com with ESMTPSA id m188sm5853846ywe.46.2016.01.14.13.49.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jan 2016 13:49:34 -0800 (PST) Date: Thu, 14 Jan 2016 16:49:34 -0500 From: Tejun Heo To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org, Dave Jones , kernel-team@fb.com Subject: [PATCH REPOST] scsi: don't count non-failure CHECK_CONDITION as error Message-ID: <20160114214934.GD3520@mtj.duckdns.org> References: <20160114214602.GC3520@mtj.duckdns.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160114214602.GC3520@mtj.duckdns.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reported-by: Dave Jones --- Hello, Reposting because the email address listed under "SCSI SUBSYSTEM", JBottomley@odin.com, bounced. James, can you please update the entry? Thanks. drivers/scsi/scsi_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 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 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);