Skip to contentSkip to conversation

nvme-fc: restart admin queue if the caller needs to restart queue

PATCH Applied Ming Lei 5 participants 9 messages Jul 21, 2022 – Aug 2, 2022

Subsystems (2)
lore
Share & tools
lore

Ming Lei

author
#0 lore raw

PATCH 1/1 nvme-fc: restart admin queue if the caller needs to restart queue

Without restarting admin queue in __nvme_fc_abort_outstanding_ios(), it leaves controller not capable of handling admin pt request, and causes io hang.

Fixes it by restarting admin queue if the caller of __nvme_fc_abort_outstanding_ios requires to restart queue.

---
 drivers/nvme/host/fc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/nvme/host/fc.c +2 -0
index 9987797620b6..8d14df8eeab8 100644
@@ -2533,6 +2533,8 @@ __nvme_fc_abort_outstanding_ios(struct nvme_fc_ctrl *ctrl, bool start_queues)
 	blk_mq_tagset_busy_iter(&ctrl->admin_tag_set,
 				nvme_fc_terminate_exchange, &ctrl->ctrl);
 	blk_mq_tagset_wait_completed_request(&ctrl->admin_tag_set);
+	if (start_queues)
+		nvme_start_admin_queue(&ctrl->ctrl);
 }
 
 static void
Signature · 1 line
2.31.1
author
#1 lore raw
Quoted 10 lines · Ming Lei

Without restarting admin queue in __nvme_fc_abort_outstanding_ios(), it leaves controller not capable of handling admin pt request, and causes io hang.

Fixes it by restarting admin queue if the caller of __nvme_fc_abort_outstanding_ios requires to restart queue.

---

Hello Guys,

Ping...

Thanks,
Ming

#2 lore raw
Quoted 3 lines · Ming Lei

Hello Guys,

Ping...

I'm waiting for a review from James, who apparently just got back from his vacation.

#3 lore raw

I have a reproducible test case, FWIW. (It requires extra kernel code to inject ERSP_IU errors though).
If you get an error at the wrong time when issuing commands e.g. in nvme_init_ctrl_finish() it ends up
with a command on the admin queue and the admin queue quiesced.

-Ewan

Quoted 9 lines · Christoph Hellwig
Quoted 3 lines · Ming Lei

Hello Guys,

Ping...

I'm waiting for a review from James, who apparently just got back from his vacation.

Reviewed-by on v1 1/1
#5 lore raw
In reply to Ming Lei
Quoted 18 lines · Ming Lei

Without restarting admin queue in __nvme_fc_abort_outstanding_ios(), it leaves controller not capable of handling admin pt request, and causes io hang.

Fixes it by restarting admin queue if the caller of __nvme_fc_abort_outstanding_ios requires to restart queue.

---
  drivers/nvme/host/fc.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/nvme/host/fc.c +0 -0
index 9987797620b6..8d14df8eeab8 100644

drivers/nvme/host/fc.c __nvme_fc_abort_outstanding_ios(struct nvme_fc_ctrl *ctrl, bool start_queues) · line 2540

Quoted 8 lines
drivers/nvme/host/fc.c +2 -0
@@ -2533,6 +2533,8 @@ __nvme_fc_abort_outstanding_ios(struct nvme_fc_ctrl *ctrl, bool start_queues)
  	blk_mq_tagset_busy_iter(&ctrl->admin_tag_set,
  				nvme_fc_terminate_exchange, &ctrl->ctrl);
  	blk_mq_tagset_wait_completed_request(&ctrl->admin_tag_set);
+	if (start_queues)
+		nvme_start_admin_queue(&ctrl->ctrl);
  }
 
  static void

Looks correct.

-- james

#8 lore raw
Quoted 8 lines · Ming Lei
Quoted 3 lines · Christoph Hellwig

Thanks,

applied to nvme-5.20.

Hi Christoph,

Looks not find the patch in your nvme-5.20 tree, :-(

I've pushed it out now.