blk_rq_dma_unmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… blk_rq_dma_unmap β€” the Kernel API Manual tea πŸŽ€

okay so bestie, welcome to the blk_rq_dma_unmap(9) page from the Kernel API Manual β€” yes it's a real kernel man page, yes we're gonna make it cute, and no we are NOT skipping a single detail. periodt. ✨


🌸 NAME 🌸

blk_rq_dma_unmap β€” try to DMA unmap a request

like, that's the whole vibe. it tries. it's a *try*er. 🫢


⭐ SYNOPSIS ⭐

bool blk_rq_dma_unmap (struct request *req , struct device *dma_dev ,
struct dma_iova_state *state , size_t mapped_len , enum
pci_p2pdma_map_type map );

and it returns a bool, bestie. that bool is the main character here, iykyk. πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

literally every single one, no skips:

  • req β€” the request to unmap πŸ’Œ
  • dma_dev β€” the device to unmap from 🌈
  • state β€” DMA IOVA state, iconic little state machine energy ✨
  • mapped_len β€” number of bytes to unmap, yes in bytes, ngl be precise πŸ“
  • map β€” peer-to-peer mapping type 🧚

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea, and it's genuinely important so listen up:

it returns false if the callers need to manually unmap every DMA segment mapped using iter β€” like, you gotta do the work yourself, sorry bestie 😭 β€” or true if no work is left to be done. that's it. that's the whole function. clean. πŸ’…

like the way that a single bool can carry this much meaning?? obsessed. πŸ”₯


🌈 SEE ALSO 🌈

go touch grass in these, respectively:

  • ./include/linux/blk-mq-dma.h β€” a kernel file, go read it πŸ’–
  • blk_rq_dma_map_coalesce(9) β€” the sibling page, the lore continues πŸŽ€

fr fr: don't sleep on the false branch. if it says false, you are the one unmapping every segment. no cap. πŸ™ˆ

okay bye bestie, stay slay and stay mapped (until you're not) πŸ’–βœ¨πŸ¦‹

β€” from ./include/linux, dated October 2026, blk_rq_dma_unmap(9), signed off with a little kiss πŸŽ€

πŸ“¦ where this page comes from