Metadata integrity, single segment and peer-to-peer

Keith Busch kbusch at kernel.org
Mon Oct 20 11:03:51 PDT 2025


On Mon, Oct 20, 2025 at 08:51:25PM +0300, Leon Romanovsky wrote:
> On Mon, Oct 20, 2025, at 20:04, Keith Busch wrote:
> > On Mon, Oct 20, 2025 at 02:50:04PM +0300, Leon Romanovsky wrote:
> >> Hi Keith,
> >> 
> >> I'm looking on the nvme_pci_setup_meta_mptr() implementation [1] and
> >> don't see is_pci_p2pdma_page() which exists in
> >> nvme_pci_setup_data_simple() [2]. Is it intentionally? Can single
> >> segment be p2p transfer?
> >
> > We may be calling unnecessarily dma_unmap_page in that case for mptr,
> > but I think that still works anyway.
> 
> How? dma_map_bvec() is actually dma_map_page_attrs() and that function doesn't handle PCI_P2PDMA_MAP_BUS_ADDR and PCI_P2PDMA_MAP_THRU_HOST_BRIDGE states.

Oh, I guess I'm mistaken. In that case, it wouldn't work. I'll get a
patch out to just always use blk_dma_iter instead.



More information about the Linux-nvme mailing list