From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>
Cc: James Smart <james.smart@broadcom.com>,
Chaitanya Kulkarni <kch@nvidia.com>,
linux-nvme@lists.infradead.org
Subject: [PATCH 3/5] nvme: only set reserved_tags in nvme_alloc_io_tag_set for fabrics controllers
Date: Wed, 30 Nov 2022 18:42:37 +0100 [thread overview]
Message-ID: <20221130174240.227616-4-hch@lst.de> (raw)
In-Reply-To: <20221130174240.227616-1-hch@lst.de>
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>
---
drivers/nvme/host/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index f31586c4689334..ed163c53976722 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)
--
2.30.2
next prev parent reply other threads:[~2022-11-30 17:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 17:42 use the core tagset alloc/free helpers in nvme-pci Christoph Hellwig
2022-11-30 17:42 ` [PATCH 1/5] nvme: pass nr_maps explicitly to nvme_alloc_io_tag_set Christoph Hellwig
2022-12-06 11:59 ` Sagi Grimberg
2022-11-30 17:42 ` [PATCH 2/5] nvme: consolidate setting the tagset flags Christoph Hellwig
2022-12-06 8:43 ` Chao Leng
2022-12-06 8:46 ` Christoph Hellwig
2022-12-06 11:59 ` Sagi Grimberg
2022-12-06 14:38 ` Christoph Hellwig
2022-11-30 17:42 ` Christoph Hellwig [this message]
2022-12-06 12:00 ` [PATCH 3/5] nvme: only set reserved_tags in nvme_alloc_io_tag_set for fabrics controllers Sagi Grimberg
2022-11-30 17:42 ` [PATCH 4/5] nvme: add the Apple shared tag workaround to nvme_alloc_io_tag_set Christoph Hellwig
2022-12-06 12:04 ` Sagi Grimberg
2022-11-30 17:42 ` [PATCH 5/5] nvme-pci: use the tagset alloc/free helpers Christoph Hellwig
2022-12-06 9:59 ` Keith Busch
2022-12-06 12:04 ` Sagi Grimberg
2022-12-06 8:18 ` use the core tagset alloc/free helpers in nvme-pci Christoph Hellwig
2022-12-07 3:22 ` Chaitanya Kulkarni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221130174240.227616-4-hch@lst.de \
--to=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox