Thread (5 messages) 5 messages, 3 authors, 2021-08-10

Re: [PATCH] nvme-rdma: Don't update queue count when failing to set io queues

From: liruozhu <hidden>
Date: 2021-08-07 03:21:36

Thanks, I will send the tcp version of this patch right away.

On 2021/8/7 4:11, Sagi Grimberg wrote:
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

Can you send this patch for tcp as well?

On 7/28/21 2:41 AM, Ruozhu Li wrote:
quoted
We update ctrl->queue_count and schedule another reconnect when io queue
count is zero.But we will never try to create any io queue in next reco-
nnection, because ctrl->queue_count already set to zero.We will end up
having an admin-only session in Live state, which is exactly what we try
to avoid in the original patch.
Update ctrl->queue_count after queue_count zero checking to fix it.

Signed-off-by: Ruozhu Li <redacted>
---
  drivers/nvme/host/rdma.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 7f6b3a991501..3bd9cbc80246 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -735,13 +735,13 @@ static int nvme_rdma_alloc_io_queues(struct 
nvme_rdma_ctrl *ctrl)
      if (ret)
          return ret;
  -    ctrl->ctrl.queue_count = nr_io_queues + 1;
-    if (ctrl->ctrl.queue_count < 2) {
+    if (nr_io_queues == 0) {
          dev_err(ctrl->ctrl.device,
              "unable to set any I/O queues\n");
          return -ENOMEM;
      }
  +    ctrl->ctrl.queue_count = nr_io_queues + 1;
      dev_info(ctrl->ctrl.device,
          "creating %d I/O queues.\n", nr_io_queues);
.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help