[PATCH 3/3] nvme-pci: do not try to add queue maps at runtime
Keith Busch
kbusch at meta.com
Tue Feb 10 11:37:15 PST 2026
From: Keith Busch <kbusch at kernel.org>
The block layer allocates the set's maps once. We can't add special
purpose queues at runtime if they weren't allocated at initialization
time.
Signed-off-by: Keith Busch <kbusch at kernel.org>
---
drivers/nvme/host/pci.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index f6d5c242fb689..43d214d31a8cf 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2775,6 +2775,20 @@ static int nvme_setup_io_queues(struct nvme_dev *dev)
dev->nr_write_queues = write_queues;
dev->nr_poll_queues = poll_queues;
+ if (dev->ctrl.tagset) {
+ switch (dev->ctrl.tagset->nr_maps) {
+ case 1:
+ dev->nr_write_queues = 0;
+ dev->nr_poll_queues = 0;
+ break;
+ case 2:
+ dev->nr_poll_queues = 0;
+ break;
+ default:
+ break;
+ }
+ }
+
nr_io_queues = min(nvme_max_io_queues(dev),
dev->nr_allocated_queues - 1);
result = nvme_set_queue_count(&dev->ctrl, &nr_io_queues);
--
2.47.3
More information about the Linux-nvme
mailing list