blk_rq_inte...p_iter_start(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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_coalesce to check if further segments need to be mapped after this one, or
  • go straight to blk_rq_dma_map_iter_next to try to map the following segments. no detour, main character energy πŸ‘‘

πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./block/blk-mq-dma.c, plus these besties:


⚠️ quick vibe check: false can mean "nothing to map" or "error happened" β€” the details land in iter.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