[PATCH 2/2] nvme-multipath: enable PCI P2PDMA for multipath devices
Chaitanya Kulkarni
kch at nvidia.com
Mon Mar 23 16:44:16 PDT 2026
NVMe multipath does not expose BLK_FEAT_PCI_P2PDMA on the head disk
even when the underlying controller supports it.
Set BLK_FEAT_PCI_P2PDMA in nvme_mpath_alloc_disk() when the controller
advertises P2PDMA support via ctrl->ops->supports_pci_p2pdma.
Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
Signed-off-by: Kiran Kumar Modukuri <kmodukuri at nvidia.com>
---
drivers/nvme/host/multipath.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index ba00f0b72b85..c49fca43ef19 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -737,6 +737,9 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
BLK_FEAT_POLL | BLK_FEAT_ATOMIC_WRITES;
if (head->ids.csi == NVME_CSI_ZNS)
lim.features |= BLK_FEAT_ZONED;
+ if (ctrl->ops && ctrl->ops->supports_pci_p2pdma &&
+ ctrl->ops->supports_pci_p2pdma(ctrl))
+ lim.features |= BLK_FEAT_PCI_P2PDMA;
head->disk = blk_alloc_disk(&lim, ctrl->numa_node);
if (IS_ERR(head->disk))
--
2.39.5
More information about the Linux-nvme
mailing list