diff options
author | Christoph Hellwig <hch@lst.de> | 2018-12-14 16:06:59 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-12-18 19:50:44 +0300 |
commit | ed92ad37e88555864f1f830db4037b9535b3392c (patch) | |
tree | ee78b423c8cdf3b037f4e924ea2dc351a2a2efc5 /drivers/nvme | |
parent | 5698b805fbf09a5dfa60829f5a179c0568a8dc3b (diff) | |
download | linux-ed92ad37e88555864f1f830db4037b9535b3392c.tar.xz |
nvme-pci: only set nr_maps to 2 if poll queues are supported
The block layer now enables polling support on a queue if nr_maps
includes the poll map, so we should only set that if we actually
support poll queues.
Fixes: 6544d229bf ("block: enable polling by default if a poll map is initalized")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/pci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 698b350b38cf..a3e0b9378e54 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2289,6 +2289,9 @@ static int nvme_dev_add(struct nvme_dev *dev) if (!dev->ctrl.tagset) { dev->tagset.ops = &nvme_mq_ops; dev->tagset.nr_hw_queues = dev->online_queues - 1; + dev->tagset.nr_maps = 2; /* default + read */ + if (dev->io_queues[HCTX_TYPE_POLL]) + dev->tagset.nr_maps++; dev->tagset.nr_maps = HCTX_MAX_TYPES; dev->tagset.timeout = NVME_IO_TIMEOUT; dev->tagset.numa_node = dev_to_node(dev->dev); |