All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Bart Van Assche <bvanassche@acm.org>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>,
	Hannes Reinecke <hare@suse.de>, Daniel Wagner <dwagner@suse.de>
Subject: [PATCH v2 03/20] Rename scsi_softirq_done() into scsi_complete()
Date: Thu, 15 Apr 2021 15:08:09 -0700	[thread overview]
Message-ID: <20210415220826.29438-4-bvanassche@acm.org> (raw)
In-Reply-To: <20210415220826.29438-1-bvanassche@acm.org>

Commit 320ae51feed5 ("blk-mq: new multi-queue block IO queueing mechanism";
v3.13) introduced a code path that calls the blk-mq completion function from
interrupt context. scsi-mq was introduced by commit d285203cf647 ("scsi:
add support for a blk-mq based I/O path."; v3.17). Since the introduction of
scsi-mq scsi_softirq_done() can be called from interrupt context. Because
that made the name of that function misleading, rename it into
scsi_complete().

Cc: Christoph Hellwig <hch@lst.de>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/scsi_lib.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 985ed427445f..c4d6157e8051 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1434,7 +1434,11 @@ static bool scsi_mq_lld_busy(struct request_queue *q)
 	return false;
 }
 
-static void scsi_softirq_done(struct request *rq)
+/*
+ * Block layer request completion callback. May be called from interrupt
+ * context.
+ */
+static void scsi_complete(struct request *rq)
 {
 	struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq);
 	int disposition;
@@ -1889,7 +1893,7 @@ static const struct blk_mq_ops scsi_mq_ops_no_commit = {
 	.get_budget	= scsi_mq_get_budget,
 	.put_budget	= scsi_mq_put_budget,
 	.queue_rq	= scsi_queue_rq,
-	.complete	= scsi_softirq_done,
+	.complete	= scsi_complete,
 	.timeout	= scsi_timeout,
 #ifdef CONFIG_BLK_DEBUG_FS
 	.show_rq	= scsi_show_rq,
@@ -1919,7 +1923,7 @@ static const struct blk_mq_ops scsi_mq_ops = {
 	.put_budget	= scsi_mq_put_budget,
 	.queue_rq	= scsi_queue_rq,
 	.commit_rqs	= scsi_commit_rqs,
-	.complete	= scsi_softirq_done,
+	.complete	= scsi_complete,
 	.timeout	= scsi_timeout,
 #ifdef CONFIG_BLK_DEBUG_FS
 	.show_rq	= scsi_show_rq,

  parent reply	other threads:[~2021-04-15 22:08 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15 22:08 [PATCH v2 00/20] SCSI patches for kernel v5.13 Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 01/20] Make the scsi_alloc_sgtables() documentation more accurate Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 02/20] Remove an incorrect comment Bart Van Assche
2021-04-15 22:08 ` Bart Van Assche [this message]
2021-04-15 22:08 ` [PATCH v2 04/20] Modify the scsi_send_eh_cmnd() return value for the SDEV_BLOCK case Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 05/20] Introduce enum scsi_disposition Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 06/20] aacraid: Remove an unused function Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 07/20] libfc: Fix a format specifier Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 08/20] fcoe: Suppress a compiler warning Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 09/20] mpt3sas: Fix two kernel-doc headers Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 10/20] myrb: Remove unused functions Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 11/20] myrs: " Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 12/20] qla4xxx: Remove an unused function Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 13/20] smartpqi: Remove unused functions Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 14/20] 53c700: Open-code status_byte(u8) calls Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 15/20] dc395x: " Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 16/20] sd: Introduce a new local variable in sd_check_events() Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 17/20] target: Compare explicitly with SAM_STAT_GOOD Bart Van Assche
2021-04-15 22:08 ` [PATCH v2 18/20] target: Fix two format specifiers Bart Van Assche
2021-04-15 23:31   ` Mike Christie
2021-04-15 22:08 ` [PATCH v2 19/20] target: Shorten ALUA error messages Bart Van Assche
2021-04-15 23:32   ` Mike Christie
2021-04-15 22:08 ` [PATCH v2 20/20] target/tcm_fc: Fix a kernel-doc header Bart Van Assche
2021-04-16  2:47 ` [PATCH v2 00/20] SCSI patches for kernel v5.13 Martin K. Petersen
2021-04-20  2:29 ` Martin K. Petersen

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=20210415220826.29438-4-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=dwagner@suse.de \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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.