From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH 1/7] nvme-rdma: pass tagset to directly nvme_rdma_free_tagset
Date: Wed, 11 Oct 2017 15:29:06 +0300 [thread overview]
Message-ID: <1507724952-13917-2-git-send-email-sagi@grimberg.me> (raw)
In-Reply-To: <1507724952-13917-1-git-send-email-sagi@grimberg.me>
Instead of flagging admin/io.
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
drivers/nvme/host/rdma.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index cf2ac5d893d5..9e040bbc08c9 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -670,11 +670,10 @@ static int nvme_rdma_alloc_io_queues(struct nvme_rdma_ctrl *ctrl)
return ret;
}
-static void nvme_rdma_free_tagset(struct nvme_ctrl *nctrl, bool admin)
+static void nvme_rdma_free_tagset(struct nvme_ctrl *nctrl,
+ struct blk_mq_tag_set *set)
{
struct nvme_rdma_ctrl *ctrl = to_rdma_ctrl(nctrl);
- struct blk_mq_tag_set *set = admin ?
- &ctrl->admin_tag_set : &ctrl->tag_set;
blk_mq_free_tag_set(set);
nvme_rdma_dev_put(ctrl->device);
@@ -744,7 +743,7 @@ static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl,
nvme_rdma_stop_queue(&ctrl->queues[0]);
if (remove) {
blk_cleanup_queue(ctrl->ctrl.admin_q);
- nvme_rdma_free_tagset(&ctrl->ctrl, true);
+ nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.admin_tagset);
}
nvme_rdma_free_queue(&ctrl->queues[0]);
}
@@ -818,7 +817,7 @@ static int nvme_rdma_configure_admin_queue(struct nvme_rdma_ctrl *ctrl,
blk_cleanup_queue(ctrl->ctrl.admin_q);
out_free_tagset:
if (new)
- nvme_rdma_free_tagset(&ctrl->ctrl, true);
+ nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.admin_tagset);
out_free_queue:
nvme_rdma_free_queue(&ctrl->queues[0]);
return error;
@@ -830,7 +829,7 @@ static void nvme_rdma_destroy_io_queues(struct nvme_rdma_ctrl *ctrl,
nvme_rdma_stop_io_queues(ctrl);
if (remove) {
blk_cleanup_queue(ctrl->ctrl.connect_q);
- nvme_rdma_free_tagset(&ctrl->ctrl, false);
+ nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.tagset);
}
nvme_rdma_free_io_queues(ctrl);
}
@@ -873,7 +872,7 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new)
blk_cleanup_queue(ctrl->ctrl.connect_q);
out_free_tag_set:
if (new)
- nvme_rdma_free_tagset(&ctrl->ctrl, false);
+ nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.tagset);
out_free_io_queues:
nvme_rdma_free_io_queues(ctrl);
return ret;
--
2.7.4
next prev parent reply other threads:[~2017-10-11 12:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 12:29 [PATCH 0/7] Some nvme-rdma host patches for 4.15 Sagi Grimberg
2017-10-11 12:29 ` Sagi Grimberg [this message]
2017-10-11 13:33 ` [PATCH 1/7] nvme-rdma: pass tagset to directly nvme_rdma_free_tagset Johannes Thumshirn
2017-10-11 18:38 ` Max Gurtovoy
2017-10-11 12:29 ` [PATCH 2/7] nvme-rdma: fix wrong logging message Sagi Grimberg
2017-10-11 13:34 ` Johannes Thumshirn
2017-10-11 18:40 ` Max Gurtovoy
2017-10-11 12:29 ` [PATCH 3/7] nvme-rdma: move assignment to declaration Sagi Grimberg
2017-10-11 13:34 ` Johannes Thumshirn
2017-10-11 18:44 ` Max Gurtovoy
2017-10-11 12:29 ` [PATCH 4/7] nvme-rdma: Check that reinit_request got a proper mr Sagi Grimberg
2017-10-11 13:35 ` Johannes Thumshirn
2017-10-11 12:29 ` [PATCH 5/7] nvme-rdma: Don't local invalidate if the queue is not live Sagi Grimberg
2017-10-11 12:29 ` [PATCH 6/7] nvme-rdma: teardown admin/io queues once on error recovery Sagi Grimberg
2017-10-15 8:05 ` Nitzan Carmi
2017-10-11 12:29 ` [PATCH 7/7] nvme-rdma: change queue flag semantics DELETING -> ALLOCATED Sagi Grimberg
2017-10-17 6:51 ` [PATCH 0/7] Some nvme-rdma host patches for 4.15 Christoph Hellwig
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=1507724952-13917-2-git-send-email-sagi@grimberg.me \
--to=sagi@grimberg.me \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).