All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-pci: use nvme core helper to cancel requests in tagset
@ 2022-07-08  3:04 Guixin Liu
  2022-07-08  9:59 ` liruozhu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Guixin Liu @ 2022-07-08  3:04 UTC (permalink / raw)
  To: kbusch, axboe, hch, sagi; +Cc: linux-nvme

Use nvme core helper nvme_cancel_tagset and nvme_cancel_admin_tagset
instead of same logic code.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
 drivers/nvme/host/pci.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e7af223..ab4facf 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2720,10 +2720,8 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
 	nvme_pci_disable(dev);
 	nvme_reap_pending_cqes(dev);
 
-	blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_request, &dev->ctrl);
-	blk_mq_tagset_busy_iter(&dev->admin_tagset, nvme_cancel_request, &dev->ctrl);
-	blk_mq_tagset_wait_completed_request(&dev->tagset);
-	blk_mq_tagset_wait_completed_request(&dev->admin_tagset);
+	nvme_cancel_tagset(&dev->ctrl);
+	nvme_cancel_admin_tagset(&dev->ctrl);
 
 	/*
 	 * The driver will not be starting up queues again if shutting down so
-- 
1.8.3.1



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

* Re: [PATCH] nvme-pci: use nvme core helper to cancel requests in tagset
  2022-07-08  3:04 [PATCH] nvme-pci: use nvme core helper to cancel requests in tagset Guixin Liu
@ 2022-07-08  9:59 ` liruozhu
  2022-07-10 11:05 ` Sagi Grimberg
  2022-07-12 15:36 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: liruozhu @ 2022-07-08  9:59 UTC (permalink / raw)
  To: Guixin Liu, kbusch, axboe, hch, sagi; +Cc: linux-nvme

On 2022/7/8 11:04, Guixin Liu wrote:

> Use nvme core helper nvme_cancel_tagset and nvme_cancel_admin_tagset
> instead of same logic code.
>
> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
> ---
>   drivers/nvme/host/pci.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index e7af223..ab4facf 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2720,10 +2720,8 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
>   	nvme_pci_disable(dev);
>   	nvme_reap_pending_cqes(dev);
>   
> -	blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_request, &dev->ctrl);
> -	blk_mq_tagset_busy_iter(&dev->admin_tagset, nvme_cancel_request, &dev->ctrl);
> -	blk_mq_tagset_wait_completed_request(&dev->tagset);
> -	blk_mq_tagset_wait_completed_request(&dev->admin_tagset);
> +	nvme_cancel_tagset(&dev->ctrl);
> +	nvme_cancel_admin_tagset(&dev->ctrl);
>   
>   	/*
>   	 * The driver will not be starting up queues again if shutting down so

Looks good to me,

Reviewed-by:Ruozhu Li <liruozhu@huawei.com>



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

* Re: [PATCH] nvme-pci: use nvme core helper to cancel requests in tagset
  2022-07-08  3:04 [PATCH] nvme-pci: use nvme core helper to cancel requests in tagset Guixin Liu
  2022-07-08  9:59 ` liruozhu
@ 2022-07-10 11:05 ` Sagi Grimberg
  2022-07-12 15:36 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2022-07-10 11:05 UTC (permalink / raw)
  To: Guixin Liu, kbusch, axboe, hch; +Cc: linux-nvme

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>


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

* Re: [PATCH] nvme-pci: use nvme core helper to cancel requests in tagset
  2022-07-08  3:04 [PATCH] nvme-pci: use nvme core helper to cancel requests in tagset Guixin Liu
  2022-07-08  9:59 ` liruozhu
  2022-07-10 11:05 ` Sagi Grimberg
@ 2022-07-12 15:36 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-07-12 15:36 UTC (permalink / raw)
  To: Guixin Liu; +Cc: kbusch, axboe, hch, sagi, linux-nvme

Thanks,

applied to nvme-5.20.


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08  3:04 [PATCH] nvme-pci: use nvme core helper to cancel requests in tagset Guixin Liu
2022-07-08  9:59 ` liruozhu
2022-07-10 11:05 ` Sagi Grimberg
2022-07-12 15: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.