From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDD39C4361B for ; Tue, 8 Dec 2020 05:01:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65AF423A5E for ; Tue, 8 Dec 2020 05:01:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725785AbgLHFBI (ORCPT ); Tue, 8 Dec 2020 00:01:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725768AbgLHFBH (ORCPT ); Tue, 8 Dec 2020 00:01:07 -0500 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3704DC0613D6 for ; Mon, 7 Dec 2020 21:00:27 -0800 (PST) Received: by mail-oi1-x22c.google.com with SMTP id s75so15107446oih.1 for ; Mon, 07 Dec 2020 21:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:references:in-reply-to:mime-version:thread-index:date :message-id:subject:to:cc; bh=zzqxn0TSzfM6sRDGXhwOU1ANBzLH51jepX/Cx7sDhU0=; b=I8XX8EaYI0BSYgbMiYNyeDY4xuylx4O6zKXd66PwdOsmnRvGX028l7C9RMm1H6Jc/T aQ6zU9DW3yeq+ZcM/yoQk2VsvxWwr2AYXR+JPJomKD5Guk1JcjVE5f/xfY8uuZEovw+l DV2QYrxTR0C+1pJj8RiGF20CsenSzL1fR+rBQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc; bh=zzqxn0TSzfM6sRDGXhwOU1ANBzLH51jepX/Cx7sDhU0=; b=RR/SWHESzTYH62btFGrMIzKd+RQVqC6Gcq/Dd28VJL1Arn3/HD7sV2H5rmHQk38Aei iC/ZkMDhPA2DWXG+rR1C1mYHe8FezqzVgKKB9gZ/LHG0gRxxW4BkhDB/FXJtKPgo3l7U rsp9AUeELJkRYlmNa6DLyLgp5I7L7h/WT0nzYWQ3l1sJVcb2QR5sOph5p56l9g0qEGbT IBv46wgE9HqcDhSd7VtbFoAPMIfZcdILiIDh/dhie3QKsOhhjLdGrBY1dRZu8fGwhNmm DtIqFw98mBzDlzHVQbmz9U5tzWxHb7twtIwZBFTzBd3Bkq7vDvmufpoyzinLrlQpMtZw 70Rw== X-Gm-Message-State: AOAM531P2z7aNwkKDFKH7qBBF2wPDEOMLcQ30l0HJ+lnHWODNMfkbn2S 23VSfn0kahQbyrJHi9VjVQq+zJIkEl0QBQH5JPYxiAjr21h6XQ6I9PCowPokxF8FGr3VSzDIMpl T/FBKCiEv04dJWAnUY+N4iGNOaI8ZNpzQeS9/ X-Google-Smtp-Source: ABdhPJwdwul38yQ3Dkl9uZZHY24WcAcrhnnNq9j+s8FK+JedNrQrPGiHarkelqMlP+IvAowU+YTqFVik7p/6d+DWwu0= X-Received: by 2002:aca:5413:: with SMTP id i19mr1535807oib.87.1607403626109; Mon, 07 Dec 2020 21:00:26 -0800 (PST) From: Muneendra Kumar M References: <1605070685-20945-1-git-send-email-muneendra.kumar@broadcom.com> In-Reply-To: <1605070685-20945-1-git-send-email-muneendra.kumar@broadcom.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQIH8uuDM4YiJUHm/GbjmPgWle4NwamKUUZA Date: Tue, 8 Dec 2020 10:30:21 +0530 Message-ID: <962c402e28d9183caef263f9fac215b3@mail.gmail.com> Subject: RE: [PATCH v7 0/5] scsi: Support to handle Intermittent errors To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com, Hannes Reinecke Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000029db8d05b5ecd2ed" Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org --00000000000029db8d05b5ecd2ed Content-Type: text/plain; charset="UTF-8" Hi Martin, Could you please let us know if the patch series can get committed to the scsi tree . This patch series has been reviewed by Hannes,Ewan and Himanshu. Thanks, Muneendra. -----Original Message----- From: Muneendra [mailto:muneendra.kumar@broadcom.com] Sent: Wednesday, November 11, 2020 10:28 AM To: linux-scsi@vger.kernel.org; michael.christie@oracle.com; hare@suse.de Cc: jsmart2021@gmail.com; emilne@redhat.com; mkumar@redhat.com; Muneendra Subject: [PATCH v7 0/5] scsi: Support to handle Intermittent errors This patch adds a support to prevent retries of all the io's after an abort succeeds on a particular device when transport connectivity to the device is encountering intermittent errors. Intermittent connectivity is a condition that can be detected by transport fabric notifications. A service can monitor the ELS notifications and take action on all the outstanding io's of a scsi device at that instant. This feature is intended to be used when the device is part of a multipath environment. When the service detects the poor connectivity, the multipath path can be placed in a marginal path group and ignored further io operations. After placing a path in the marginal path group,the daemon sets the port_state to Marginal which sets bit in scmd->state for all the io's on that particular device with the new sysfs interface provided in this patch.This prevent retries of all the io's if an io hits a scsi timeout which inturn issues an abort. On Abort succeeds on a marginal path the io will be immediately retried on another active path.On abort fails then the things escalates to existing target reset sg interface recovery process. Below is the interface provided to set the port state to Marginal and Online. echo "Marginal" >> /sys/class/fc_remote_ports/rport-X\:Y-Z/port_state echo "Online" >> /sys/class/fc_remote_ports/rport-X\:Y-Z/port_state The patches were cut against 5.11/scsi-queue tree --- v7: Added New routine in scsi_host_template to decide if a cmd is retryable instead of checking the same using SCMD_NORETRIES_ABORT bit as the cmd retry part can be checked by validating the port state. Removed the changes related to SCMD_NORETRIES_ABORT bit. Added a new function fc_eh_should_retry_cmd to check whether the cmd should be retried based on the rport state. Reoreder the patch The patches were cut against 5.11/scsi-queue tree v6: Reordered the patches to make patch ordering and more logical. v5: Added the DID_TRANSPORT_MARGINAL case to scsi_decide_disposition Made changes to clear the SCMD_NORETRIES_ABORT bit if the port_state has changed from marginal to online due to port_delete and port_add as we need the normal cmd retry behaviour while we are calling the eh handlers. Made changes in fc_scsi_scan_rport as we are checking FC_PORTSTATE_ONLINE instead of FC_PORTSTATE_ONLINE and FC_PORTSTATE_MARGINAL v4: Made changes in fc_eh_timed_out callout to set the SCMD_NORETRIES_ABORT if port state is marginal With this change, we removed the code to loop over running commands and fc_remote_port_chkready changes to set the SCMD_NORETRIES_ABORT Removed the scsi_cmd argument for fc_remote_port_chkready and reverted back the patches that addressed this change(argument) Removed unnecessary comments Handle the return of errors on failure. v3: Removed the port_state from starget attributes. Enabled the store functionality for port_state under remote port Added a new argument to scsi_cmd to fc_remote_port_chkready Used the existing scsi command iterators scsi_host_busy_iter. Rearranged the patches Added new patches to add new argument for fc_remote_port_chkready v2: Added new error code DID_TRANSPORT_MARGINAL to handle marginal errors. Added a new rport_state FC_PORTSTATE_MARGINAL and also added a new sysfs interface port_state to set the port_state to marginal. Added the support in lpfc to handle the marginal state. *** BLURB HERE *** Muneendra (5): scsi: Added a new error code DID_TRANSPORT_MARGINAL in scsi.h scsi: No retries on abort success scsi_transport_fc: Added a new rport state FC_PORTSTATE_MARGINAL scsi_transport_fc: Added store fucntionality to set the rport port_state using sysfs scsi:lpfc: Added support for eh_should_retry_cmd drivers/scsi/lpfc/lpfc_scsi.c | 1 + drivers/scsi/scsi_error.c | 23 +++++- drivers/scsi/scsi_lib.c | 1 + drivers/scsi/scsi_transport_fc.c | 118 ++++++++++++++++++++++++++----- include/scsi/scsi.h | 1 + include/scsi/scsi_host.h | 6 ++ include/scsi/scsi_transport_fc.h | 4 +- 7 files changed, 133 insertions(+), 21 deletions(-) -- 2.26.2 -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it. --00000000000029db8d05b5ecd2ed Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQTQYJKoZIhvcNAQcCoIIQPjCCEDoCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2iMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQGEwJC RTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEzMDEGA1UEAxMqR2xvYmFsU2lnbiBQZXJzb25h bFNpZ24gMiBDQSAtIFNIQTI1NiAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA tpZok2X9LAHsYqMNVL+Ly6RDkaKar7GD8rVtb9nw6tzPFnvXGeOEA4X5xh9wjx9sScVpGR5wkTg1 fg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