public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: John Meneghini <jmeneghi@redhat.com>
Cc: kbusch@kernel.org, hch@lst.de, sagi@grimberg.me,
	loberman@redhat.com, linux-nvme@lists.infradead.org,
	linux-kernel@vger.kernel.org, emilne@redhat.com,
	bgurney@redhat.com
Subject: Re: [PATCH 4/4] nvme: add mulitipath warning to nvme_alloc_ns
Date: Wed, 5 Mar 2025 15:37:01 +0100	[thread overview]
Message-ID: <20250305143701.GA18818@lst.de> (raw)
In-Reply-To: <20250228032541.369804-5-jmeneghi@redhat.com>

On Thu, Feb 27, 2025 at 10:25:41PM -0500, John Meneghini wrote:
> When CONFIG_NVME_MULTIPATH is disabled, add a warning if
> we discover a multipath enabled controller with an attached
> shared namespace.
> 
> Signed-off-by: John Meneghini <jmeneghi@redhat.com>
> ---
>  drivers/nvme/host/core.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index c2b7e6834535..465069c0f6a8 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -3938,6 +3938,15 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)
>  	} else {
>  		sprintf(disk->disk_name, "nvme%dn%d", ctrl->instance,
>  			ns->head->instance);
> +#ifndef CONFIG_NVME_MULTIPATH

This can use IS_ENABLED to clean the code up a bit.

> +		if ((ctrl->subsys->cmic & NVME_CTRL_CMIC_MULTI_CTRL) && info->is_shared) {

overly long line.


      reply	other threads:[~2025-03-05 14:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28  3:25 [PATCH 0/4] nvme: make core.nvme_multipath configurable John Meneghini
2025-02-28  3:25 ` [PATCH 1/4] nvme-multipath: change the NVME_MULTIPATH config option John Meneghini
2025-03-05 14:33   ` Christoph Hellwig
2025-02-28  3:25 ` [PATCH 2/4] nvme-multipath: add the NVME_MULTIPATH_PARAM " John Meneghini
2025-02-28  6:28   ` Nilay Shroff
2025-02-28 13:07     ` John Meneghini
2025-03-05 14:33   ` Christoph Hellwig
2025-03-12  2:35     ` John Meneghini
2025-03-12  5:19       ` Christoph Hellwig
2025-03-13 21:46         ` John Meneghini
2025-03-17 18:00           ` Keith Busch
2025-02-28  3:25 ` [PATCH 3/4] nvme: update the multipath warning in nvme_init_ns_head John Meneghini
2025-02-28  6:28   ` Nilay Shroff
2025-02-28 13:14     ` John Meneghini
2025-03-02 17:28       ` Nilay Shroff
2025-02-28  3:25 ` [PATCH 4/4] nvme: add mulitipath warning to nvme_alloc_ns John Meneghini
2025-03-05 14:37   ` Christoph Hellwig [this message]

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=20250305143701.GA18818@lst.de \
    --to=hch@lst.de \
    --cc=bgurney@redhat.com \
    --cc=emilne@redhat.com \
    --cc=jmeneghi@redhat.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=loberman@redhat.com \
    --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