summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/rdma.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-11-30 17:16:52 +0100
committerChristoph Hellwig <hch@lst.de>2022-12-07 15:02:15 +0100
commitdcef77274ae52136925287b6b59d5c6e6a4adfb9 (patch)
tree57a10ff4c8aca390356440f7109ac02d75e1cc8c /drivers/nvme/host/rdma.c
parent68e81eba6763cd834aa8ff9ac0cd6174fa69fa39 (diff)
downloadlinux-stable-dcef77274ae52136925287b6b59d5c6e6a4adfb9.tar.gz
linux-stable-dcef77274ae52136925287b6b59d5c6e6a4adfb9.tar.bz2
linux-stable-dcef77274ae52136925287b6b59d5c6e6a4adfb9.zip
nvme: pass nr_maps explicitly to nvme_alloc_io_tag_set
Don't look at ctrl->ops as only RDMA and TCP actually support multiple maps. Fixes: 6dfba1c09c10 ("nvme-fc: use the tagset alloc/free helpers") Fixes: ceee1953f923 ("nvme-loop: use the tagset alloc/free helpers") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Diffstat (limited to 'drivers/nvme/host/rdma.c')
-rw-r--r--drivers/nvme/host/rdma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index cc61a1b8311b..cf8f500405b1 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -798,7 +798,9 @@ static int nvme_rdma_alloc_tag_set(struct nvme_ctrl *ctrl)
NVME_RDMA_METADATA_SGL_SIZE;
return nvme_alloc_io_tag_set(ctrl, &to_rdma_ctrl(ctrl)->tag_set,
- &nvme_rdma_mq_ops, BLK_MQ_F_SHOULD_MERGE, cmd_size);
+ &nvme_rdma_mq_ops, BLK_MQ_F_SHOULD_MERGE,
+ ctrl->opts->nr_poll_queues ? HCTX_MAX_TYPES : 2,
+ cmd_size);
}
static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl)