diff options
author | Christoph Hellwig <hch@lst.de> | 2022-11-30 19:27:07 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-12-07 17:02:24 +0300 |
commit | b794d1c2ad6d7921f2867ce393815ad31b5b5a83 (patch) | |
tree | 683538d9c3d8f18ed652b58225a78e9a9ee63db7 /drivers/nvme | |
parent | db45e1a5ddccc034eb60d62fc5352022d7963ae2 (diff) | |
download | linux-b794d1c2ad6d7921f2867ce393815ad31b5b5a83.tar.xz |
nvme: only set reserved_tags in nvme_alloc_io_tag_set for fabrics controllers
The reserved_tags are only needed for fabrics controllers. Right now only
fabrics drivers call this helper, so this is harmless, but we'll use it
in the PCIe driver soon.
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')
-rw-r--r-- | drivers/nvme/host/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index f31586c46893..ed163c539767 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -4899,7 +4899,8 @@ int nvme_alloc_io_tag_set(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set, memset(set, 0, sizeof(*set)); set->ops = ops; set->queue_depth = ctrl->sqsize + 1; - set->reserved_tags = NVMF_RESERVED_TAGS; + if (ctrl->ops->flags & NVME_F_FABRICS) + set->reserved_tags = NVMF_RESERVED_TAGS; set->numa_node = ctrl->numa_node; set->flags = BLK_MQ_F_SHOULD_MERGE; if (ctrl->ops->flags & NVME_F_BLOCKING) |