blk_rq_dma_map_iter_start(9)
π blk_rq_dma_map_iter_start(9) β Kernel API Manual
okay bestie, welcome to the Kernel API Manual β¨ this one's a (9) page, aka the good stuff, and it's literally about kicking off DMA mapping for a request. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
blk_rq_dma_map_iter_start β map the first DMA segment for a request π
πΈ SYNOPSIS πΈ
bool blk_rq_dma_map_iter_start (struct request *req , struct device
*dma_dev , struct dma_iova_state *state , struct blk_dma_iter *iter );
like, yes, it's a bool. it's giving "did this work or not" energy π
π¦ ARGUMENTS π¦
reqβ the request you wanna map. the main character, fr fr πdma_devβ the device you're mapping it to. where it's all going π«stateβ the DMA IOVA state. bestie, you gotta hold onto this one, more on that below πiterβ the block layer DMA iterator. lives in the moment, only needed at map time β
π DESCRIPTION π
so here's the vibe: this starts the DMA mapping of req to dma_dev. easy.
now the cute part β state and iter are provided by the caller and they don't need to be initialized. love that for you, no setup arc required β¨ but heads up: state needs to be stored so you can use it at unmap time, while iter is only needed at map time. write that down, iykyk π
it returns false if there's no segment to map β and yes, that includes when it's false because of an error π β or true if it did map a segment. periodt.
if a segment got mapped, the DMA address for it comes back in iter.addr and the length in iter.len. and if no segment was mapped? then the status code comes back in iter.status. simple as π¦
after this, the caller can call blk_rq_dma_map_coalesce to check whether further segments still need mapping, or just go straight to blk_rq_dma_map_iter_next to try to map the following segments. your call, main character π
π SEE ALSO π
- Kernel file
./block/blk-mq-dma.cπ blk_rq_dma_map_iter_next(9)π₯blk_rq_integrity_dma_map_iter_start(9)βblk_rq_integrity_dma_map_iter_next(9)π¦blk_rq_map_integrity_sg(9)π
and that's the whole page, bestie, no cap π
it lives in ./block, dated October 2026, and this little group chat is officially over β go map some segments, slay πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms