[PATCH] nvme-multipath: allocate MQ disk
Vitaly Mayatskikh
vitaly at enfabrica.net
Thu Jun 9 10:37:34 PDT 2022
nvme_mpath_alloc_disk() allocates gendisk with blk_alloc_disk(), which
results in no MQ support even if the head device has it.
Signed-off-by: Vitaly Mayatskikh <vitaly at enfabrica.net>
---
drivers/nvme/host/multipath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index d3e2440d8abb..3f085f838910 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -490,7 +490,7 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
!nvme_is_unique_nsid(ctrl, head) || !multipath)
return 0;
- head->disk = blk_alloc_disk(ctrl->numa_node);
+ head->disk = blk_mq_alloc_disk(ctrl->tagset, NULL);
if (!head->disk)
return -ENOMEM;
head->disk->fops = &nvme_ns_head_ops;
--
2.25.1
More information about the Linux-nvme
mailing list