From: Irvin Cote <irvincoteg@gmail.com>
To: hch@lst.de
Cc: kbusch@kernel.org, axboe@kernel.dk, sagi@grimberg.me,
linux-nvme@lists.infradead.org, Irvin Cote <irvincoteg@gmail.com>
Subject: [PATCH 2/2] nvme-core: use nvme_ns_head_multipath instead of ns->head->disk
Date: Thu, 18 May 2023 19:10:54 -0300 [thread overview]
Message-ID: <20230518221054.56378-3-irvincoteg@gmail.com> (raw)
In-Reply-To: <20230518221054.56378-1-irvincoteg@gmail.com>
Change the way we check for a multipath nshead so as
to consistently use the same check to assert the same condition.
Signed-off-by: Irvin Cote <irvincoteg@gmail.com>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index ccb6eb1282f8..c6889cf4439d 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -4310,7 +4310,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)
* instance as shared namespaces will show up as multiple block
* devices.
*/
- if (ns->head->disk) {
+ if (nvme_ns_head_multipath(ns->head)) {
sprintf(disk->disk_name, "nvme%dc%dn%d", ctrl->subsys->instance,
ctrl->instance, ns->head->instance);
disk->flags |= GENHD_FL_HIDDEN;
--
2.39.2
next prev parent reply other threads:[~2023-05-18 22:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 22:10 [PATCH 0/2] minor changes regarding multipath-head assertion Irvin Cote
2023-05-18 22:10 ` [PATCH 1/2] nvme-core: remove redundant condition in nvme_ns_head_multipath Irvin Cote
2023-05-19 2:12 ` Jens Axboe
2023-05-20 4:24 ` Christoph Hellwig
2023-05-18 22:10 ` Irvin Cote [this message]
2023-05-20 4:24 ` [PATCH 2/2] nvme-core: use nvme_ns_head_multipath instead of ns->head->disk Christoph Hellwig
2023-06-12 17:59 ` Keith Busch
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=20230518221054.56378-3-irvincoteg@gmail.com \
--to=irvincoteg@gmail.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--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