Skip to contentSkip to conversation

Metadata integrity, single segment and peer-to-peer

DISCUSSION Leon Romanovsky 2 participants 4 messages Oct 20, 2025 NVMe

lore
Share & tools
lore
maintainer
#1 lore raw
Quoted 6 lines · Leon Romanovsky

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.

#2 lore raw
Quoted 10 lines · Keith Busch
Quoted 6 lines · Leon Romanovsky

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.

Thanks

maintainer
#3 lore raw
Quoted 9 lines · Leon Romanovsky
Quoted 8 lines · Keith Busch
Quoted 6 lines · Leon Romanovsky

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?

Quoted 4 lines
Quoted 2 lines

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.