Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5269139iog; Wed, 22 Jun 2022 16:07:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7R92+auDySiZDgx9uQbm9JvfFMlc1RfTtMikvjMZ4ZXOsZ2EzOBmj7qEN88E+sUPFalct X-Received: by 2002:a17:90b:1b07:b0:1ec:c617:a314 with SMTP id nu7-20020a17090b1b0700b001ecc617a314mr756095pjb.214.1655939240275; Wed, 22 Jun 2022 16:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655939240; cv=none; d=google.com; s=arc-20160816; b=aYRzb3GSGWWU5bFWDKFD72cZTlm+63NeICua2Acjhv2sx5+thlFhwnGuyZeFef3i9S 4z2HUPt9ApPHBDn9f0cSRAJpQuxRtmAbmwcA715E8bkCEz2BoaZUrvxfMdCXqr9z8al3 eyv+d5bOejvgL1XA6K9LKL+1Z184RCI0xSxmZDTXeojvTpu977hMWyeYXtfLq15sU6YS c+sM/uF1NDDEjjD0A33X2V8hMRckmpcAdz7M4RaBHLUwmSpRutzNIu+dek8I0zg9kvF0 HgFwuBPyFDt4ypedqRFYfwajPy12m1KZ0jEPbYmNi8P1/yUyfQICIzcm7easTGaBjCaT i8Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=Vret8gLknIlhome6Bj5k2433lbzdAz5ReX4y6f/lSS8=; b=ojz8caSCdT8dZ8TH4KpGWi2PrdCHON1r8zHMbjYyU9DE88XTHwKgIDfMsnAUqV5V2/ 9Dl3CDEt53b5nVur3XPS+/bLNLPCJ5Sl+urgF+JVgJ+DtTJQE/quzYOnj1DqImVJTNT9 elQ0HN4TQHaRRKowyL0cVIw97HusRr3NTPg2IRd3uqN2kAH4Iqirt2247fCMX9gut0mP Qgfdxh91icub/JAReDqX3XtNQ+Qd8Pir/wxhMyxL4iPi8SF1qdyXGtIGvdd3j5cgH4Vx xtHIb520s50Fmzu+6FugTfdmaJzU+OnxN/ADcUc1fIyRvW0GApLV3YssUXmdnTSPDR4B 8fYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="KXsL1gE/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 196-20020a6300cd000000b0040ca1fee045si5856893pga.224.2022.06.22.16.07.03; Wed, 22 Jun 2022 16:07:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="KXsL1gE/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376800AbiFVXEY (ORCPT + 99 others); Wed, 22 Jun 2022 19:04:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233622AbiFVXEX (ORCPT ); Wed, 22 Jun 2022 19:04:23 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04EDD3BA72; Wed, 22 Jun 2022 16:04:19 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25MFx9RJ005129; Wed, 22 Jun 2022 16:04:02 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=date : from : to : cc : subject : in-reply-to : message-id : references : mime-version : content-type; s=pfpt0220; bh=Vret8gLknIlhome6Bj5k2433lbzdAz5ReX4y6f/lSS8=; b=KXsL1gE/1qUqt5IN/s71ZtD7QOpGGwK9x7roJJJkeXsUMM9yFbaKYhPXtP8j1EOojk36 kLHznkFFHI4lIIdnrDNRkiWQWINQSDo+dvA8AWCQRxVgoJ7kihNGki0bRATL9HbKj7v9 V8QwjNAhw4U6YwuZ+Wt5Us+EGZs8j1esy1+fJ0Xj/8NAV01rCc/fp7C7bb9yEYqpyfpA QqWAjYUB5i4PeYvkcrJ2kafXcOI2N6FNEj8oJf5tfbJL9YQC+ThmU8nUOlkTpHF/1oLB s/7AhD9ZZcJfhagu7j1Wz0Yf0jbDL84M4ZwQOCOpXkEJjOt1SrnkEOaPPNH0JDnHzWgj yg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3guye7v1gs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 22 Jun 2022 16:04:02 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jun 2022 16:04:00 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 22 Jun 2022 16:04:00 -0700 Received: from mvluser05.qlc.com (unknown [10.112.10.135]) by maili.marvell.com (Postfix) with ESMTP id D36E63F70DC; Wed, 22 Jun 2022 16:03:50 -0700 (PDT) Received: from localhost (aeasi@localhost) by mvluser05.qlc.com (8.14.4/8.14.4/Submit) with ESMTP id 25MN3nEA021837; Wed, 22 Jun 2022 16:03:49 -0700 X-Authentication-Warning: mvluser05.qlc.com: aeasi owned process doing -bs Date: Wed, 22 Jun 2022 16:03:49 -0700 From: Arun Easi X-X-Sender: aeasi@mvluser05.qlc.com To: Tony Battersby CC: Thorsten Leemhuis , Saurav Kashyap , Nilesh Javali , , , , Subject: Re: [EXT] Re: [REGRESSION] qla2xxx: tape drive not removed after unplug FC cable In-Reply-To: Message-ID: References: <5bcb5963-9da0-fd59-45c5-d27af02e7748@leemhuis.info> <178e4e7a-64fc-a442-cdda-45100eaebda0@cybernetics.com> User-Agent: Alpine 2.21.9999 (LRH 334 2019-03-29) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1879738122-1333578364-1655939030=:4730" X-Proofpoint-GUID: M9G7T-WcRHLfZ2tM46pAgif6uF0_ZHqW X-Proofpoint-ORIG-GUID: M9G7T-WcRHLfZ2tM46pAgif6uF0_ZHqW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-22_08,2022-06-22_03,2022-06-22_01 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --1879738122-1333578364-1655939030=:4730 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Hi Tony, On Wed, 22 Jun 2022, 7:56am, Tony Battersby wrote: > On 6/21/22 18:05, Arun Easi wrote: > > Thanks for the info. Just to reiterate, you've reported two issues (though > > this log was showing only 1 of them). > > > > Issue 1 - Tape device never disappears when removed > > Issue 2 - When a direct connected tape 1 was replaced with tape 2, tape 2 > > was not discovered. > > > > For Issue-2, please try the attached patch. This may not be the final fix, > > but wanted to check if that would fix the issue for you. > > > > For Issue-1, the behavior was intentional, though that behavior needs > > refinement. These tape drives support something called FC sequence level > > error recovery (added in FCP-2), which can make tape I/Os survive even > > across a short cable pull. This is not a simple retry of the I/O, rather a > > retry done at the FC sequence level that gives the IO a better chance of > > revival. In other words, the said patch that caused regression, while > > introduces an incorrect reporting of the state of the device, makes backup > > more resilient. > > > > Now, onto the behavior when device state is reported immediately. What we > > have observed, at least with one tape drive from a major vendor, is that, > > across a device loss and device back case with both the events reported to > > upper layers, the backup operation was getting failed. This is due to a > > REPORT LUNS command being issued during device reappearance reporting > > (fc_remote_port_add -> SCSI scan), which the tape drive was not expecting > > and caused the backup to fail. > > > > I know that some tape drives do not support multiple commands to it at the > > same time, but not sure if that is still the norm these days. > > > > So, perhaps one way to make the behavior better, is to either report the > > disappearing device a bit delayed or have intelligence added in SCSI scan > > to detect ongoing tape IO operations and delay/avoid the REPORT LUNs. > > Former is a more contained (in the LLD) fix. > > > > Regards, > > -Arun > > Your patch does fix Issue-2 for me.  For Issue-1, it would be fine with > me if qla2xxx reported device removal to the upper level a bit delayed, > as you said. > Thanks for testing and verifying the patch. We will post the patch upstream after due testing. Regards, -Arun --1879738122-1333578364-1655939030=:4730--