From nobody Wed Apr 1 12:56:34 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1426E14A4DF for ; Fri, 28 Feb 2025 03:25:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740713159; cv=none; b=Vecnvo5olNn/w69EggDsH+jJGygXiAz6tSOhRbV+y6Rb3pZKJyaRJVz59/iSHv+DQM67o0sWzEd83S/ZEjrXiKNDLVvcnE98+ek82CHS9FHnLiXroLnUV2rtmSCql3nULPgJQYh5qya0wK+zV/b1VKGOMwLL7I0oQfPdiENGHYE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740713159; c=relaxed/simple; bh=BfoWirKBssgrKY8ocekDTILHuJjp+NkwLX+7TGVyNhw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=uHDHpK2DTJ9idLn6SJ7n+OJCXzfaxyEoILcd10g9mzR7AoqpabaGIxIWl4cFMKM+v9hYt37XnhJQTBserMAJVe11fzmenLfmney3lkidKMsuP57o96WUgd/QT4N8J1IAkUMSjAV2o77hg/JdD826IQEDR/rAxiacjmnoGosbXRM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=UFr2Yer6; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UFr2Yer6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740713156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/vefzqVchTzg4OUcLEG5G0ex/Mo/H0nqRf+9HiCYTGY=; b=UFr2Yer6yywdK4NOVspfAFYiTbYGWeSP2PKUatsaIArF97uI7e6/XSHBiZH3NbmbCjphUU vym66t5aekSz+vClzf0SQ/awzXzQnstBTDHebWPwLQDWsTv0VlmhTI4gxxfHfZApd2UgPu HOWZgZDAWo1it7hW1dZavLlvhpye7Zs= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-686-ul5x38IrMUC19Vl42Twh0g-1; Thu, 27 Feb 2025 22:25:54 -0500 X-MC-Unique: ul5x38IrMUC19Vl42Twh0g-1 X-Mimecast-MFC-AGG-ID: ul5x38IrMUC19Vl42Twh0g_1740713153 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DC5E81954B1A; Fri, 28 Feb 2025 03:25:52 +0000 (UTC) Received: from jmeneghi-thinkpadp1gen3.rmtusnh.csb (unknown [10.22.88.31]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BFD391800988; Fri, 28 Feb 2025 03:25:50 +0000 (UTC) From: John Meneghini To: kbusch@kernel.org, hch@lst.de, sagi@grimberg.me Cc: loberman@redhat.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, emilne@redhat.com, jmeneghi@redhat.com, bgurney@redhat.com Subject: [PATCH 1/4] nvme-multipath: change the NVME_MULTIPATH config option Date: Thu, 27 Feb 2025 22:25:38 -0500 Message-ID: <20250228032541.369804-2-jmeneghi@redhat.com> In-Reply-To: <20250228032541.369804-1-jmeneghi@redhat.com> References: <20250228032541.369804-1-jmeneghi@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" Fix up the NVME_MULTIPATH config description so that it accurately describes what it does. Signed-off-by: John Meneghini Reviewed-by: Christoph Hellwig --- drivers/nvme/host/Kconfig | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig index 486afe598184..91b0346ce65a 100644 --- a/drivers/nvme/host/Kconfig +++ b/drivers/nvme/host/Kconfig @@ -18,10 +18,15 @@ config NVME_MULTIPATH bool "NVMe multipath support" depends on NVME_CORE help - This option enables support for multipath access to NVMe - subsystems. If this option is enabled only a single - /dev/nvmeXnY device will show up for each NVMe namespace, - even if it is accessible through multiple controllers. + This option controls support for multipath access to NVMe + subsystems. If this option is enabled support for NVMe multipath + access is included in the kernel. If this option is disabled support + for NVMe multipath access is excluded from the kernel. When this + option is disabled each controller/namespace receives its + own /dev/nvmeXnY device entry and NVMe multipath access is + not supported. + + If unsure, say Y. =20 config NVME_VERBOSE_ERRORS bool "NVMe verbose error reporting" --=20 2.48.1 From nobody Wed Apr 1 12:56:34 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7794515ECDF for ; Fri, 28 Feb 2025 03:26:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740713169; cv=none; b=s2u8gBaxRGfypghRn2NoV+uUTGiAgkIixhnzZSRay9IxFZrfi9w4NFPQf5ijd5tiKz4k0VwF9EeHFV9ugI2MBCRt7576vzLvHY+U+AZEw3nj9K35uaYdXL/iDsoR6qUnWijryqRA6PhlmcC8Xtu5UwtQPeg44YUMHOszOqaZJtE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740713169; c=relaxed/simple; bh=8rOP13hhuE1G+Rgw9CwthL+SGr9IIYHK9Bo7EFRetCw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=OOZS6BJTtuqxJbMaLKZsakhVOSuvLln4V8ux9pSIeC2DxaTYvj6K63MQDoAKlT5So+FzSM4KkM8sV2myyAf75aEKh2bw/DZZPq7jYi+op6vtRIh6asb/sPg/PlmwFFpCCGx+Kf8VAS2aqcnMU3m7Qo4SUCUdMXRBTyjVUnQQQ6Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KfVbsTJ6; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KfVbsTJ6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740713163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BE/DQRlr1UZMYjXT2iLkw402U/iU1veOuNJ4jK09ueU=; b=KfVbsTJ6O3gVhL/3yLefuLQblEq4SSsZTzS3y5GRrLSLUFYJsrfJy3AUMOFerKiPNKVFLn QyWaCdj6aLGA678UB4qbjsnc/8v8nSJolpzmv7miCccS0ADSBncTCuYV3S+9FueZjrdGJg eaoadpTMN99vo7gTwfoSZyKql7Wyj/U= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-96-jEL8Oe1TNe2t2kg3JLj7rQ-1; Thu, 27 Feb 2025 22:25:58 -0500 X-MC-Unique: jEL8Oe1TNe2t2kg3JLj7rQ-1 X-Mimecast-MFC-AGG-ID: jEL8Oe1TNe2t2kg3JLj7rQ_1740713157 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4429C18011E4; Fri, 28 Feb 2025 03:25:57 +0000 (UTC) Received: from jmeneghi-thinkpadp1gen3.rmtusnh.csb (unknown [10.22.88.31]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2B4BC18009AE; Fri, 28 Feb 2025 03:25:53 +0000 (UTC) From: John Meneghini To: kbusch@kernel.org, hch@lst.de, sagi@grimberg.me Cc: loberman@redhat.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, emilne@redhat.com, jmeneghi@redhat.com, bgurney@redhat.com Subject: [PATCH 2/4] nvme-multipath: add the NVME_MULTIPATH_PARAM config option Date: Thu, 27 Feb 2025 22:25:39 -0500 Message-ID: <20250228032541.369804-3-jmeneghi@redhat.com> In-Reply-To: <20250228032541.369804-1-jmeneghi@redhat.com> References: <20250228032541.369804-1-jmeneghi@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" The NVME_MULTIPATH_PARAM option controls the core.nvme_multipath module parameter. When NVME_MULTIPATH_PARAM=3Dn the multipath parameter is removed and core nvme multipathing is enabled. When NVME_MULTIPATH_PARAM=3Dy the multipath parameter is added and multipath support becomes configurable with the core.nvme_multipath parameter. By default NVME_MULTIPATH_PARAM=3Dy Signed-off-by: John Meneghini --- drivers/nvme/host/Kconfig | 15 +++++++++++++++ drivers/nvme/host/multipath.c | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig index 91b0346ce65a..c4251504f201 100644 --- a/drivers/nvme/host/Kconfig +++ b/drivers/nvme/host/Kconfig @@ -28,6 +28,21 @@ config NVME_MULTIPATH =20 If unsure, say Y. =20 +config NVME_MULTIPATH_PARAM + bool "NVMe multipath param" + depends on NVME_CORE && NVME_MULTIPATH + help + This option enables configurable support for multipath access with + NVMe subsystems. If this option is enabled NVMe multipath support is + configured by the nvme core module parameter named "multipath". If + this option is disabled the nvme core module "multipath" parameter + is removed and support for NVMe multipath access can not be + configured. When this option is disabled a single /dev/nvmeXnY + device entry will be seen for each NVMe namespace, even if the + namespace is accessible through multiple controllers. + + If unsure, say Y. + config NVME_VERBOSE_ERRORS bool "NVMe verbose error reporting" depends on NVME_CORE diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 2a7635565083..4536ad5fbb82 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -10,10 +10,11 @@ #include "nvme.h" =20 bool multipath =3D true; +#ifdef NVME_MULTIPATH_PARAM module_param(multipath, bool, 0444); MODULE_PARM_DESC(multipath, "turn on native support for multiple controllers per subsystem"); - +#endif static const char *nvme_iopolicy_names[] =3D { [NVME_IOPOLICY_NUMA] =3D "numa", [NVME_IOPOLICY_RR] =3D "round-robin", --=20 2.48.1 From nobody Wed Apr 1 12:56:34 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49E6414A4DF for ; Fri, 28 Feb 2025 03:26:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740713167; cv=none; b=HzUoVha8T10HGaqVJef/oPuT9QUKqxQIxODMZen1bNarHZvMsGkxZgRoU0AlXKw5WJaRkMfMUXZ7nJF9C9gIUVYcfMhuGhur9CQxuP5Q2q6omLl/pQJlHks7MUeBEgU2zZaeLoNXMDLkYkou0PDf20Xd2oCFMnyx6aON9gmabgg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740713167; c=relaxed/simple; bh=MrAX5gf3asz7d67qP34+Mdon0sRLA6xUv9Sut1h/bwg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=M1L7SQyu8fSJB0Gkg+uMD+elAVCwTVho2lO2WRyagRAJBcujCnrLyoPqDna92ewTGiiRHtcIiKYjGNBWvpley8c/KTzhfcqjDX1jyFIZN+JqoX0Pdfj7ke8HD5gtW339bHOy/ez/I+yIxtYjMl/rk42a9eon8rQd44GlVlFdTy4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SwAHtvMk; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SwAHtvMk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740713165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IP0rVGLccAQop086ZZXP2hGbaZD9tbaXKoP4vlHgFdg=; b=SwAHtvMkdHaPBldrAf84v44EJG9DKDWP5qAcjh2w5hz7nlktmTvxN4SvmMEEJ36Xd+ftEZ WjTDI3uUDTF4E+HcQgJ2m9ARp8rt0k6ATAAKtOOWmnOo/+pRcCEEVrKGkde2GTnR+kE1IQ rr84v0Uf6JEhzGlzN4vwr3fpvS4sRLw= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-144-H7aDcUvoO2-qvES-9l8rIg-1; Thu, 27 Feb 2025 22:26:00 -0500 X-MC-Unique: H7aDcUvoO2-qvES-9l8rIg-1 X-Mimecast-MFC-AGG-ID: H7aDcUvoO2-qvES-9l8rIg_1740713159 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7F1A5191815F; Fri, 28 Feb 2025 03:25:59 +0000 (UTC) Received: from jmeneghi-thinkpadp1gen3.rmtusnh.csb (unknown [10.22.88.31]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6DA6C180035E; Fri, 28 Feb 2025 03:25:57 +0000 (UTC) From: John Meneghini To: kbusch@kernel.org, hch@lst.de, sagi@grimberg.me Cc: loberman@redhat.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, emilne@redhat.com, jmeneghi@redhat.com, bgurney@redhat.com Subject: [PATCH 3/4] nvme: update the multipath warning in nvme_init_ns_head Date: Thu, 27 Feb 2025 22:25:40 -0500 Message-ID: <20250228032541.369804-4-jmeneghi@redhat.com> In-Reply-To: <20250228032541.369804-1-jmeneghi@redhat.com> References: <20250228032541.369804-1-jmeneghi@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" The new NVME_MULTIPATH_PARAM config option requires updates to the warning message in nvme_init_ns_head(). Remove the old warning message and add new ones. Signed-off-by: John Meneghini --- drivers/nvme/host/core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 818d4e49aab5..c2b7e6834535 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3823,8 +3823,16 @@ static int nvme_init_ns_head(struct nvme_ns *ns, str= uct nvme_ns_info *info) dev_warn(ctrl->device, "Found shared namespace %d, but multipathing not supported.\n", info->nsid); +#ifdef CONFIG_NVME_MULTIPATH +#ifdef CONFIG_NVME_MULTIPATH_PARAM + dev_warn_once(ctrl->device, + "Shared namespace support requires core.nvme_multipath=3DY.\n"); + +#endif +#else dev_warn_once(ctrl->device, - "Support for shared namespaces without CONFIG_NVME_MULTIPATH is deprec= ated and will be removed in Linux 6.0.\n"); + "Shared namespace support requires CONFIG_NVME_MULTIPATH.\n"); +#endif } } =20 --=20 2.48.1 From nobody Wed Apr 1 12:56:34 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4608B192B76 for ; Fri, 28 Feb 2025 03:26:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740713174; cv=none; b=A3/4CAKN3Z/XptfS58F6bbfJRxEUl1MhgDeVwBNAuF+Z6C7tPr2OY85xVF8Uqr9ZkA9iPA+JoKB9LF97QLrgcTEYFEsOB3yU35rkLgYhQ5iKt0RhhUrwlUWtqD99lP1E6FLrueCYxXKW5SHlYjSoYmSaoWuPbD9Dl8/Yap2UnRE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740713174; c=relaxed/simple; bh=azTGRMn5Yx6O4wwQUJFHoxAJafiE4E1uJ0hsOBjUNHo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=O10K02rr0s1gCyTMmd5i/yMwwYEGM2NsbhB5K6uYyEORPBEVbaPfEkZbclQhh3m7C1RDDwQzPbKpzT/tY+uUPT3WXFQb9ZDoo0ae/7miwLhM0rHJb9JVPF7G26Fs3fD08iBDjFh0p0oMx+SCsTaM+PmnC2OPQ7uHbR4MBmNok5Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=eDXfyGX7; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eDXfyGX7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740713172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YKStR8dsG/OBwzMqbeiTBAwfOm05XDTOH4bItz+QaXw=; b=eDXfyGX7AD5JYX2NYPuJv43UIJyG8I3kY+/N8vpkNzVkGAhoJz8i8Bz4jOAMpfao2pHfXA 64aYwEilLflN2Nkur9vBcv0HmopnIvk/YE+6sidTI25/BiEyCXYOYbwbszn1T1Vp6/09bQ 54at6igumwvRFWTnWPuuk6WuB9aZCUE= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-635-QhSVW3QPPf6pyUxRakNLZg-1; Thu, 27 Feb 2025 22:26:07 -0500 X-MC-Unique: QhSVW3QPPf6pyUxRakNLZg-1 X-Mimecast-MFC-AGG-ID: QhSVW3QPPf6pyUxRakNLZg_1740713166 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B27D41800570; Fri, 28 Feb 2025 03:26:06 +0000 (UTC) Received: from jmeneghi-thinkpadp1gen3.rmtusnh.csb (unknown [10.22.88.31]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C37D91800988; Fri, 28 Feb 2025 03:25:59 +0000 (UTC) From: John Meneghini To: kbusch@kernel.org, hch@lst.de, sagi@grimberg.me Cc: loberman@redhat.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, emilne@redhat.com, jmeneghi@redhat.com, bgurney@redhat.com Subject: [PATCH 4/4] nvme: add mulitipath warning to nvme_alloc_ns Date: Thu, 27 Feb 2025 22:25:41 -0500 Message-ID: <20250228032541.369804-5-jmeneghi@redhat.com> In-Reply-To: <20250228032541.369804-1-jmeneghi@redhat.com> References: <20250228032541.369804-1-jmeneghi@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" 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 --- 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, st= ruct nvme_ns_info *info) } else { sprintf(disk->disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance); +#ifndef CONFIG_NVME_MULTIPATH + if ((ctrl->subsys->cmic & NVME_CTRL_CMIC_MULTI_CTRL) && info->is_shared)= { + dev_warn(ctrl->device, + "Found shared namespace %d but multipathing not supported.\n", + info->nsid); + dev_warn_once(ctrl->device, + "Shared namespace support requires CONFIG_NVME_MULTIPATH.\n"); + } +#endif } =20 if (nvme_update_ns_info(ns, info)) --=20 2.48.1