All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-loop: use nvme core helpers to cancel all requests in a tagset
@ 2022-06-26 14:06 Sagi Grimberg
  2022-06-27 20:02 ` Chaitanya Kulkarni
  2022-07-06 16:36 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Sagi Grimberg @ 2022-06-26 14:06 UTC (permalink / raw)
  To: linux-nvme; +Cc: Christoph Hellwig, Chaitanya Kulkarni, Keith Busch

A helper now exist, no need to open-code the same functionality.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
---
 drivers/nvme/target/loop.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index 59024af2da2e..9c9c428ae538 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -424,9 +424,7 @@ static void nvme_loop_shutdown_ctrl(struct nvme_loop_ctrl *ctrl)
 {
 	if (ctrl->ctrl.queue_count > 1) {
 		nvme_stop_queues(&ctrl->ctrl);
-		blk_mq_tagset_busy_iter(&ctrl->tag_set,
-					nvme_cancel_request, &ctrl->ctrl);
-		blk_mq_tagset_wait_completed_request(&ctrl->tag_set);
+		nvme_cancel_tagset(&ctrl->ctrl);
 		nvme_loop_destroy_io_queues(ctrl);
 	}
 
@@ -434,9 +432,7 @@ static void nvme_loop_shutdown_ctrl(struct nvme_loop_ctrl *ctrl)
 	if (ctrl->ctrl.state == NVME_CTRL_LIVE)
 		nvme_shutdown_ctrl(&ctrl->ctrl);
 
-	blk_mq_tagset_busy_iter(&ctrl->admin_tag_set,
-				nvme_cancel_request, &ctrl->ctrl);
-	blk_mq_tagset_wait_completed_request(&ctrl->admin_tag_set);
+	nvme_cancel_admin_tagset(&ctrl->ctrl);
 	nvme_loop_destroy_admin_queue(ctrl);
 }
 
-- 
2.34.1



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

* Re: [PATCH] nvme-loop: use nvme core helpers to cancel all requests in a tagset
  2022-06-26 14:06 [PATCH] nvme-loop: use nvme core helpers to cancel all requests in a tagset Sagi Grimberg
@ 2022-06-27 20:02 ` Chaitanya Kulkarni
  2022-07-06 16:36 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2022-06-27 20:02 UTC (permalink / raw)
  To: Sagi Grimberg, linux-nvme@lists.infradead.org
  Cc: Christoph Hellwig, Chaitanya Kulkarni, Keith Busch

On 6/26/22 07:06, Sagi Grimberg wrote:
> A helper now exist, no need to open-code the same functionality.
> 
> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck



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

* Re: [PATCH] nvme-loop: use nvme core helpers to cancel all requests in a tagset
  2022-06-26 14:06 [PATCH] nvme-loop: use nvme core helpers to cancel all requests in a tagset Sagi Grimberg
  2022-06-27 20:02 ` Chaitanya Kulkarni
@ 2022-07-06 16:36 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2022-07-06 16:36 UTC (permalink / raw)
  To: Sagi Grimberg
  Cc: linux-nvme, Christoph Hellwig, Chaitanya Kulkarni, Keith Busch

Thanks, applied to nvme-5.20.


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

end of thread, other threads:[~2022-07-06 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-26 14:06 [PATCH] nvme-loop: use nvme core helpers to cancel all requests in a tagset Sagi Grimberg
2022-06-27 20:02 ` Chaitanya Kulkarni
2022-07-06 16:36 ` Christoph Hellwig

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.