From: Muneendra <muneendra.kumar@broadcom.com>
To: linux-scsi@vger.kernel.org, hare@suse.de
Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com,
Muneendra <muneendra.kumar@broadcom.com>
Subject: [PATCH v2 0/8] scsi: Support to handle Intermittent errors
Date: Mon, 28 Sep 2020 10:20:49 +0530 [thread overview]
Message-ID: <1601268657-940-1-git-send-email-muneendra.kumar@broadcom.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2669 bytes --]
This patch adds a support to prevent retries of all the pending/inflight
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
outstanding io's on that particular device with the new sysfs interface
provided in this patch.This prevent retries of all the pending/inflight
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_transport/targetX\:Y\:Z/port_state
echo "Online" >> /sys/class/fc_transport/targetX\:Y\:Z/port_state
The patches were cut against 5.10/scsi-queue tree
---
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.
Muneendra (8):
scsi: Added a new definition in scsi_cmnd.h
scsi: Added a new error code in scsi.h
scsi: Clear state bit SCMD_NORETRIES_ABORT of scsi_cmd before start
request
scsi: No retries on abort success
scsi: Added routine to set/clear SCMD_NORETRIES_ABORT bit for
outstanding io on scsi_dev
scsi_transport_fc: Added a new rport state FC_PORTSTATE_MARGINAL
scsi_transport_fc: Added a new sysfs attribute port_state
lpfc: Added support to handle marginal state
drivers/scsi/lpfc/lpfc_scsi.c | 6 ++
drivers/scsi/scsi_error.c | 86 +++++++++++++++++++
drivers/scsi/scsi_lib.c | 2 +
drivers/scsi/scsi_priv.h | 2 +
drivers/scsi/scsi_transport_fc.c | 140 +++++++++++++++++++++++++++----
include/scsi/scsi.h | 1 +
include/scsi/scsi_cmnd.h | 3 +
include/scsi/scsi_transport_fc.h | 24 ++++++
8 files changed, 246 insertions(+), 18 deletions(-)
--
2.26.2
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4177 bytes --]
next reply other threads:[~2020-09-28 11:44 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-28 4:50 Muneendra [this message]
2020-09-28 4:50 ` [PATCH v2 1/8] scsi: Added a new definition in scsi_cmnd.h Muneendra
2020-09-30 9:17 ` Hannes Reinecke
2020-09-28 4:50 ` [PATCH v2 2/8] scsi: Added a new error code in scsi.h Muneendra
2020-09-30 9:17 ` Hannes Reinecke
2020-09-28 4:50 ` [PATCH v2 3/8] scsi: Clear state bit SCMD_NORETRIES_ABORT of scsi_cmd before start request Muneendra
2020-09-30 9:19 ` Hannes Reinecke
2020-09-28 4:50 ` [PATCH v2 4/8] scsi: No retries on abort success Muneendra
2020-09-30 9:27 ` Hannes Reinecke
2020-09-28 4:50 ` [PATCH v2 5/8] scsi: Added routine to set/clear SCMD_NORETRIES_ABORT bit for outstanding io on scsi_dev Muneendra
2020-09-30 9:26 ` Hannes Reinecke
2020-09-28 4:50 ` [PATCH v2 6/8] scsi_transport_fc: Added a new rport state FC_PORTSTATE_MARGINAL Muneendra
2020-09-30 9:30 ` Hannes Reinecke
2020-09-28 4:50 ` [PATCH v2 7/8] scsi_transport_fc: Added a new sysfs attribute port_state Muneendra
2020-09-30 9:33 ` Hannes Reinecke
2020-10-01 13:13 ` Muneendra Kumar M
2020-10-05 9:18 ` Muneendra Kumar M
2020-10-05 9:29 ` Hannes Reinecke
2020-10-07 7:14 ` Muneendra Kumar M
2020-10-02 16:26 ` Benjamin Block
2020-10-05 6:49 ` Hannes Reinecke
2020-10-05 8:41 ` Benjamin Block
2020-09-28 4:50 ` [PATCH v2 8/8] lpfc: Added support to handle marginal state Muneendra
2020-09-30 9:36 ` Hannes Reinecke
2020-09-30 11:33 ` Muneendra Kumar M
2020-09-30 11:50 ` Hannes Reinecke
2020-10-01 8:59 ` Muneendra Kumar M
2020-10-02 17:01 ` [PATCH v2 0/8] scsi: Support to handle Intermittent errors Mike Christie
2020-10-02 17:27 ` James Smart
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=1601268657-940-1-git-send-email-muneendra.kumar@broadcom.com \
--to=muneendra.kumar@broadcom.com \
--cc=emilne@redhat.com \
--cc=hare@suse.de \
--cc=jsmart2021@gmail.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mkumar@redhat.com \
/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