Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-loop: set blocking flag
@ 2024-10-17 17:20 Keith Busch
  2024-10-17 17:36 ` Bart Van Assche
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Keith Busch @ 2024-10-17 17:20 UTC (permalink / raw)
  To: linux-nvme; +Cc: sagi, hch, Keith Busch, Shinichiro Kawasaki

From: Keith Busch <kbusch@kernel.org>

Commit 505363957fad ("nvmet: fix nvme status code when namespace is
disabled") introduced a mutex lock in the io path for target. The loop
target connects this to the blk-mq submission side, so it requires the
blocking flag set so that queue_rq doesn't happen inside an rcu context.

Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/nvme/target/loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index e32790d8fc260..77dd809fe4507 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -479,7 +479,7 @@ static void nvme_loop_reset_ctrl_work(struct work_struct *work)
 static const struct nvme_ctrl_ops nvme_loop_ctrl_ops = {
 	.name			= "loop",
 	.module			= THIS_MODULE,
-	.flags			= NVME_F_FABRICS,
+	.flags			= NVME_F_FABRICS | NVME_F_BLOCKING,
 	.reg_read32		= nvmf_reg_read32,
 	.reg_read64		= nvmf_reg_read64,
 	.reg_write32		= nvmf_reg_write32,
-- 
2.43.5



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-10-23  5:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17 17:20 [PATCH] nvme-loop: set blocking flag Keith Busch
2024-10-17 17:36 ` Bart Van Assche
2024-10-17 17:39 ` Jens Axboe
2024-10-17 18:04   ` Keith Busch
2024-10-18  5:10     ` Christoph Hellwig
2024-10-20 21:35       ` Sagi Grimberg
2024-10-22  6:28         ` Christoph Hellwig
2024-10-22  7:02           ` Christoph Hellwig
2024-10-22  8:08             ` Shinichiro Kawasaki
2024-10-23  5:20               ` hch
2024-10-22  9:26             ` Sagi Grimberg
2024-10-22  9:25           ` Sagi Grimberg
2024-10-18  5:10   ` Christoph Hellwig
2024-10-18  4:19 ` Shinichiro Kawasaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox