From patchwork Thu Sep 25 16:57:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 4976631 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 62BF5BEEA6 for ; Thu, 25 Sep 2014 17:02:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8569320279 for ; Thu, 25 Sep 2014 17:02:21 +0000 (UTC) Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 252632024D for ; Thu, 25 Sep 2014 17:02:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8PGvl5d020274; Thu, 25 Sep 2014 12:57:47 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s8PGvja1020393 for ; Thu, 25 Sep 2014 12:57:45 -0400 Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.16]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8PGvjVv012377 for ; Thu, 25 Sep 2014 12:57:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8PGviFo022574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 25 Sep 2014 12:57:44 -0400 Received: from hch by bombadil.infradead.org with local (Exim 4.80.1 #2 (Red Hat Linux)) id 1XXCMR-0000Be-A9; Thu, 25 Sep 2014 16:57:43 +0000 Date: Thu, 25 Sep 2014 09:57:43 -0700 From: Christoph Hellwig To: Brian King Message-ID: <20140925165743.GA20621@infradead.org> References: <20140924195721.148637349@linux.vnet.ibm.com> <20140924195752.289011902@linux.vnet.ibm.com> <5423B664.2020007@suse.de> <5424472E.4060300@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5424472E.4060300@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-RedHat-Spam-Score: -3.045 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.16 X-loop: dm-devel@redhat.com Cc: device-mapper development , James Bottomley , linux-scsi@vger.kernel.org Subject: Re: [dm-devel] [PATCH 1/1] multipath-tools: Change path checker for IBM IPR devices X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 On Thu, Sep 25, 2014 at 11:47:42AM -0500, Brian King wrote: > The issue we've run into started when this patch started making its > way into distros: > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/scsi/scsi_error.c?id=14216561e164671ce147458653b1fea06a4ada1e > > That changed the behaviour for user initiated TUR commands. After an ipr > adapter gets reset, all disk array devices require a start unit command > to be issued to them before they will accept commands. So, with the SCSI > EH change, we now end up in a scenario with dual ipr adapters where the > TUR getting issued from the health checker returns with a Not Ready response > and since SCSI EH no longer triggers the Start Unit in this scenario, > the path never recovers. > > The alternative solution would be to change the TUR path checker in multipath-tools > to issue a Start Unit if it sees a 02/04/02. Or we could fix up the check introduced by the commit, with something ala: > > Thanks, > > Brian > > -- > Brian King > Power Linux I/O > IBM Linux Technology Center > > > -- > dm-devel mailing list > dm-devel@redhat.com > https://www.redhat.com/mailman/listinfo/dm-devel ---end quoted text--- --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index a2c3d3d..7228d9e 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -459,13 +459,18 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) if (! scsi_command_normalize_sense(scmd, &sshdr)) return FAILED; /* no valid sense data */ - if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done) + if (scmd->cmnd[0] == TEST_UNIT_READY && + scmd->request->cmd_type == REQ_TYPE_FS && + scmd->scsi_done != scsi_eh_done) { /* * nasty: for mid-layer issued TURs, we need to return the * actual sense data without any recovery attempt. For eh - * issued ones, we need to try to recover and interpret + * issued ones, we need to try to recover and interpret, + * and for pass through TURs we just need to stay out of the + * way, so that the device handlers can do the right thing. */ return SUCCESS; + } scsi_report_sense(sdev, &sshdr);