[PATCH 1/2] nvme-rdma: always try to configure io queue when user wants it
Ruozhu Li
liruozhu at huawei.com
Tue Aug 3 02:06:29 PDT 2021
During reconnection, if set queue count feature failed, we will
set ctrl->queue_count to 1, and schedule another reconnection.But when
ctrl->queue_count is 1, we won't try to configure io queue again.
We should always try to configure io queues if user wants it.
Signed-off-by: Ruozhu Li <liruozhu at huawei.com>
---
drivers/nvme/host/rdma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 7f6b3a991501..df4f872c05f0 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1089,6 +1089,7 @@ static int nvme_rdma_setup_ctrl(struct nvme_rdma_ctrl *ctrl, bool new)
{
int ret;
bool changed;
+ struct nvmf_ctrl_options *opts = ctrl->ctrl.opts;
ret = nvme_rdma_configure_admin_queue(ctrl, new);
if (ret)
@@ -1121,7 +1122,8 @@ static int nvme_rdma_setup_ctrl(struct nvme_rdma_ctrl *ctrl, bool new)
if (ctrl->ctrl.sgls & (1 << 20))
ctrl->use_inline_data = true;
- if (ctrl->ctrl.queue_count > 1) {
+ if (opts->nr_io_queues || opts->nr_write_queues ||
+ opts->nr_poll_queues) {
ret = nvme_rdma_configure_io_queues(ctrl, new);
if (ret)
goto destroy_admin;
--
2.16.4
More information about the Linux-nvme
mailing list