From: Jens Axboe <axboe@kernel.dk>
To: Irvin Cote <irvincoteg@gmail.com>, hch@lst.de
Cc: kbusch@kernel.org, sagi@grimberg.me, linux-nvme@lists.infradead.org
Subject: Re: [PATCH 1/2] nvme-core: remove redundant condition in nvme_ns_head_multipath
Date: Thu, 18 May 2023 20:12:23 -0600 [thread overview]
Message-ID: <147b8893-10cd-27dd-eb48-3a5128de8f5d@kernel.dk> (raw)
In-Reply-To: <20230518221054.56378-2-irvincoteg@gmail.com>
On 5/18/23 4:10?PM, Irvin Cote wrote:
> head->disk implies IS_ENABLED(CONFIG_NVME_MULTIPATH) (c.f
> nvme_mpath_alloc_disk) hence the condition is redundant.
>
> Signed-off-by: Irvin Cote <irvincoteg@gmail.com>
> ---
> drivers/nvme/host/nvme.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index bf46f122e9e1..7820e40cdce4 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -453,7 +453,7 @@ struct nvme_ns_head {
>
> static inline bool nvme_ns_head_multipath(struct nvme_ns_head *head)
> {
> - return IS_ENABLED(CONFIG_NVME_MULTIPATH) && head->disk;
> + return head->disk;
> }
Might not matter for this case, but this changes something that'd
compile away for !CONFIG_NVME_MULTIPATH to now needing to read
disk->head instead. That doesn't seem like a good change.
--
Jens Axboe
next prev parent reply other threads:[~2023-05-19 2:12 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 [this message]
2023-05-20 4:24 ` Christoph Hellwig
2023-05-18 22:10 ` [PATCH 2/2] nvme-core: use nvme_ns_head_multipath instead of ns->head->disk Irvin Cote
2023-05-20 4:24 ` 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=147b8893-10cd-27dd-eb48-3a5128de8f5d@kernel.dk \
--to=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=irvincoteg@gmail.com \
--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