nvme: introduce multipath_always_on module param
authorNilay Shroff <nilay@linux.ibm.com>
Wed, 14 May 2025 13:03:16 +0000 (18:33 +0530)
committerChristoph Hellwig <hch@lst.de>
Tue, 20 May 2025 03:34:46 +0000 (05:34 +0200)
commit737af5f0011a400c79c7fa7bce2f5bcb69be35d7
treed325c433f7c136f26c77952fc9dd012eb1daffbf
parent62188639ec160eb77cb758c3a95947ebc918e76f
nvme: introduce multipath_always_on module param

Currently, a multipath head disk node is not created for single-
ported NVMe adapters or private namespaces with non-unique NSID.
However, creating a head node in these cases can help transparently
handle transient PCIe link failures. Without a head node, features
like delayed removal cannot be leveraged, making it difficult to
tolerate such link failures. To address this, this commit introduces
nvme_core module parameter multipath_always_on.

When multipath_always_on is set to true, it forces the creation of a
multipath head node regardless NVMe disk or namespace type. So this
option allows the use of delayed removal of head node functionality
even for single-ported NVMe disks and private namespaces with a unique
NSID and thus helps transparently handle transient PCIe link failures.

By default multipath_always_on is set to false, thus preserving the
existing behavior. Setting it to true enables improved fault tolerance
in PCIe setups. Moreover, please note that enabling this option would
also implicitly enable nvme_core.multipath.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/multipath.c