Commit 41e8cfa1 authored by Sagi Grimberg's avatar Sagi Grimberg

nvme-rdma: rename nvme_rdma_init_queue to nvme_rdma_alloc_queue

Give it a name symmetric to nvme_rdma_free_queue. Also pass in the ctrl
sqsize+1 and not the opts queue_size.  And suppress a superflous
failure message.
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 148b4e7f
...@@ -504,7 +504,7 @@ static int nvme_rdma_create_queue_ib(struct nvme_rdma_queue *queue) ...@@ -504,7 +504,7 @@ static int nvme_rdma_create_queue_ib(struct nvme_rdma_queue *queue)
return ret; return ret;
} }
static int nvme_rdma_init_queue(struct nvme_rdma_ctrl *ctrl, static int nvme_rdma_alloc_queue(struct nvme_rdma_ctrl *ctrl,
int idx, size_t queue_size) int idx, size_t queue_size)
{ {
struct nvme_rdma_queue *queue; struct nvme_rdma_queue *queue;
...@@ -615,7 +615,7 @@ static int nvme_rdma_connect_io_queues(struct nvme_rdma_ctrl *ctrl) ...@@ -615,7 +615,7 @@ static int nvme_rdma_connect_io_queues(struct nvme_rdma_ctrl *ctrl)
return ret; return ret;
} }
static int nvme_rdma_init_io_queues(struct nvme_rdma_ctrl *ctrl) static int nvme_rdma_alloc_io_queues(struct nvme_rdma_ctrl *ctrl)
{ {
struct nvmf_ctrl_options *opts = ctrl->ctrl.opts; struct nvmf_ctrl_options *opts = ctrl->ctrl.opts;
unsigned int nr_io_queues; unsigned int nr_io_queues;
...@@ -634,13 +634,10 @@ static int nvme_rdma_init_io_queues(struct nvme_rdma_ctrl *ctrl) ...@@ -634,13 +634,10 @@ static int nvme_rdma_init_io_queues(struct nvme_rdma_ctrl *ctrl)
"creating %d I/O queues.\n", nr_io_queues); "creating %d I/O queues.\n", nr_io_queues);
for (i = 1; i < ctrl->ctrl.queue_count; i++) { for (i = 1; i < ctrl->ctrl.queue_count; i++) {
ret = nvme_rdma_init_queue(ctrl, i, ret = nvme_rdma_alloc_queue(ctrl, i,
ctrl->ctrl.opts->queue_size); ctrl->ctrl.sqsize + 1);
if (ret) { if (ret)
dev_info(ctrl->ctrl.device,
"failed to initialize i/o queue: %d\n", ret);
goto out_free_queues; goto out_free_queues;
}
} }
return 0; return 0;
...@@ -736,7 +733,7 @@ static int nvme_rdma_configure_admin_queue(struct nvme_rdma_ctrl *ctrl, ...@@ -736,7 +733,7 @@ static int nvme_rdma_configure_admin_queue(struct nvme_rdma_ctrl *ctrl,
{ {
int error; int error;
error = nvme_rdma_init_queue(ctrl, 0, NVME_AQ_DEPTH); error = nvme_rdma_alloc_queue(ctrl, 0, NVME_AQ_DEPTH);
if (error) if (error)
return error; return error;
...@@ -824,7 +821,7 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new) ...@@ -824,7 +821,7 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new)
{ {
int ret; int ret;
ret = nvme_rdma_init_io_queues(ctrl); ret = nvme_rdma_alloc_io_queues(ctrl);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment