From: Muneendra <muneendra.kumar@broadcom.com>
To: linux-scsi@vger.kernel.org, michael.christie@oracle.com, hare@suse.de
Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com,
Muneendra <muneendra.kumar@broadcom.com>
Subject: [PATCH v6 1/4] scsi: Added a new definition in scsi_cmnd.h
Date: Thu, 5 Nov 2020 11:39:53 +0530 [thread overview]
Message-ID: <1604556596-27228-2-git-send-email-muneendra.kumar@broadcom.com> (raw)
In-Reply-To: <1604556596-27228-1-git-send-email-muneendra.kumar@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]
Added a new definition SCMD_NORETRIES_ABORT in scsi_cmnd.h
The SCMD_NORETRIES_ABORT defines the third bit postion
in scmd->state
Clearing the SCMD_NORETRIES_ABORT bit in state flag before
blk_mq_start_request
Signed-off-by: Muneendra <muneendra.kumar@broadcom.com>
---
v6:
Rearranged the patch by merging first hunk of the patch2 in v5
to this patch
v5:
No Change
v4:
No Change
v3:
No change
v2:
Modified the commit log
---
drivers/scsi/scsi_lib.c | 1 +
include/scsi/scsi_cmnd.h | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 1a2e9bab42ef..2b5dea07498e 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1660,6 +1660,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
req->rq_flags |= RQF_DONTPREP;
} else {
clear_bit(SCMD_STATE_COMPLETE, &cmd->state);
+ clear_bit(SCMD_NORETRIES_ABORT, &cmd->state);
}
cmd->flags &= SCMD_PRESERVED_FLAGS;
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 69ade4fb71aa..8dec4ec6bd5f 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -64,6 +64,9 @@ struct scsi_pointer {
/* for scmd->state */
#define SCMD_STATE_COMPLETE 0
#define SCMD_STATE_INFLIGHT 1
+#define SCMD_NORETRIES_ABORT 2 /* If this bit is set then there won't be any
+ * retries of scmd on abort success
+ */
struct scsi_cmnd {
struct scsi_request req;
--
2.26.2
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4177 bytes --]
next prev parent reply other threads:[~2020-11-05 13:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 6:09 [PATCH v6 0/4] scsi: Support to handle Intermittent errors Muneendra
2020-11-05 6:09 ` Muneendra [this message]
2020-11-05 6:09 ` [PATCH v6 2/4] scsi: No retries on abort success Muneendra
2020-11-05 6:09 ` [PATCH v6 3/4] scsi_transport_fc: Added a new rport state FC_PORTSTATE_MARGINAL Muneendra
2020-11-05 15:59 ` Mike Christie
2020-11-05 17:27 ` Muneendra Kumar M
2020-11-05 19:15 ` Mike Christie
2020-11-05 20:02 ` Muneendra Kumar M
2020-11-06 7:23 ` Hannes Reinecke
2020-11-07 1:18 ` Mike Christie
2020-11-05 20:01 ` Muneendra Kumar M
2020-11-05 6:09 ` [PATCH v6 4/4] scsi_transport_fc: Added store fucntionality to set the rport port_state using sysfs Muneendra
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=1604556596-27228-2-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=michael.christie@oracle.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.