blk_rq_dma_map_iter_next(9)
π« blk_rq_dma_map_iter_next(9) β the kernel API manual page, bestie edition π«
okay so this is a section 9 (kernel API) manual page for blk_rq_dma_map_iter_next, and honestly? it's giving "small function, big job." let's get into it π
β¨ NAME β¨
blk_rq_dma_map_iter_next β map the next DMA segment for a request
like, literally what it says on the tin, no cap π
πΈ SYNOPSIS πΈ
bool blk_rq_dma_map_iter_next (struct request *req , struct device
*dma_dev , struct blk_dma_iter *iter );
she takes three things and hands you back a bool. iconic signature tbh π«Ά
π¦ ARGUMENTS π¦
reqβ the request you wanna map. yes, that request. the one right in front of you πdma_devβ the device you're mapping to. pick your fave, she's not judging β¨iterβ the block layer DMA iterator. the little main character holding all your state π
π₯ DESCRIPTION π₯
so basically: this is the "and then what?" of the DMA mapping saga. you call blk_rq_dma_map_iter_start first, and then this function iterates you along to the next mapping. if you want the full breakdown of the arguments, the manpage says to go check out blk_rq_dma_map_iter_start β see there for a detailed description of the arguments. iykyk π
she returns false if there's no segment to map, and that includes when it happened because of an error π. she returns true if it did, in fact, map a segment. slay.
now the tea on what comes back π:
- if a segment was mapped β the DMA address for it lands in
iter.addr, and the length lands initer.len. go off, queen π - if no segment was mapped β the status code comes back to you in
iter.status. that's your vibe check, read it carefully β
ngl bestie, always peek atiter.statuswhen you get afalseβ that's where the actual story is π
π SEE ALSO π
the kernel file ./block/blk-mq-dma.c, plus the whole friend group of related calls β go say hi π:
blk_rq_dma_map_iter_start(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 π this one lives under ./block in the source tree, and it's stamped October 2026 in the kernel API manual. go map some segments, you absolute icon πΈπ¦β¨
π¦ 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