public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] nvme-multipath: allocate MQ disk
@ 2022-06-09 17:37 Vitaly Mayatskikh
  2022-06-09 17:49 ` Keith Busch
  2022-06-10  5:59 ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Vitaly Mayatskikh @ 2022-06-09 17:37 UTC (permalink / raw)
  To: linux-nvme; +Cc: Christoph Hellwig

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@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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-10 14:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-09 17:37 [PATCH] nvme-multipath: allocate MQ disk Vitaly Mayatskikh
2022-06-09 17:49 ` Keith Busch
2022-06-09 18:23   ` Vitaly Mayatskikh
2022-06-10  5:59 ` Christoph Hellwig
2022-06-10 14:25   ` Vitaly Mayatskikh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox