blk_rq_inte...p_iter_start(9)
π blk_rq_integrity_dma_map_iter_start β Kernel API Manual β¨
okay so bestie, welcome to the Kernel API Manual, and today's main character is blk_rq_integrity_dma_map_iter_start π (yes the header truncates it to blk_rq_inte...p_iter_start(9), no we're not gonna let that disrespect slide π«Ά).
πΈ NAME πΈ
blk_rq_integrity_dma_map_iter_start β maps the first integrity DMA segment for a request. literally the opener, the pilot episode, the first slice of the pizza π
β¨ SYNOPSIS β¨
bool blk_rq_integrity_dma_map_iter_start (struct request *req , struct
device *dma_dev , struct dma_iova_state *state , struct blk_dma_iter
*iter );
it's giving bool return, it's giving four args, it's giving slay π
π ARGUMENTS π
reqβ the request you're mapping. the subject of the whole operation πdma_devβ the device you're mapping to. the destination of the vibe πstateβ the DMA IOVA state. lowkey the memory-keeping one, we'll get to it π§iterβ the block layer DMA iterator. the little walker that walks the segments π
π¦ DESCRIPTION π¦
so what this does is: start DMA mapping the req integrity data to dma_dev. that's the whole task, and it ate π₯
here's the cute part β state and iter are supplied by the caller and don't need to be initialized. no cap. you don't have to prep them, they arrive ready to go β¨ but bestie, listen: state needs to be stored for use at unmap time, while iter is only needed at map time. so like, state is the one you keep in your contacts π± and iter is the one you text once and never again π
it returns false if there is no segment to map β and that includes when it's false because of an error, so don't assume "no segment" means "all good" π β or true if it did map a segment. periodt.
if a segment was mapped, the DMA address for it comes back in iter.addr and the length in iter.len π¬ and if no segment was mapped, the status code is returned in iter.status. so the info is always somewhere, just gotta know which pocket π€²
and then? you've got options, bestie:
- call
blk_rq_dma_map_coalesceto check if further segments need to be mapped after this one, or - go straight to
blk_rq_dma_map_iter_nextto try to map the following segments. no detour, main character energy π
π SEE ALSO π
Kernel file ./block/blk-mq-dma.c, plus these besties:
blk_rq_dma_map_iter_start(9)blk_rq_dma_map_iter_next(9)blk_rq_integrity_dma_map_iter_next(9)blk_rq_map_integrity_sg(9)
β οΈ quick vibe check:falsecan mean "nothing to map" or "error happened" β the details land initer.status. don't skip that check fr fr π
πΈ okay that's the whole page, mwah π this one came from the ./block source, dated October 2026, and the header/footer kept calling it blk_rq_inte...p_iter_start(9) β the truncation is not the vibe but it is the documentation ππ«Ά byeee β¨ππ
π¦ 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