[PATCH 1/2] md: Add PCI_P2PDMA support for MD RAID volumes
Christoph Hellwig
hch at lst.de
Mon Mar 23 23:48:16 PDT 2026
On Mon, Mar 23, 2026 at 04:44:15PM -0700, Chaitanya Kulkarni wrote:
> MD RAID does not propagate BLK_FEAT_PCI_P2PDMA from member devices to
> the RAID device, preventing peer-to-peer DMA through the RAID layer even
> when all underlying devices support it.
>
> Enable BLK_FEAT_PCI_P2PDMA by default in md_init_stacking_limits() and
> clear it in mddev_stack_rdev_limits() during array init and
> mddev_stack_new_rdev() during hot-add if any member device lacks support.
>
> Tested with RAID arrays containing multiple NVMe devices with P2PDMA
> support, confirming that peer-to-peer transfers work correctly through
> the RAID layer.
Which personalities did you test this with? Parity RAID needs to
copy from the data payload, which is not going to work very well
with P2P mappings.
More information about the Linux-nvme
mailing list