blk_rq_unmap_user(9)
π blk_rq_unmap_user(9) β from the Kernel API Manual, bestie
okay so picture this: you mapped a request with user data, and now you gotta un-map it. that's the whole gig. it's giving cleanup era β¨ and honestly? iconic. π
No cap, this page lives in the Kernel API Manual, so you already know it's the real deal. π«Ά
β¨ SYNOPSIS β¨
int blk_rq_unmap_user (struct bio *bio );
that's it. one function, one arg, returns an int. slay. π
π¦ ARGUMENTS π¦
bioβ start of bio list. literally just the beginning of the bio list, that's the whole vibe. πΈ
π₯ DESCRIPTION π₯
so what does it actually do?? it unmaps a rq that was previously mapped by blk_rq_map_user. simple as that. β¨
but here's the part you CANNOT skip, bestie, pay attention π: the caller must supply the original rq->bio from the blk_rq_map_user return, because the I/O completion may have changed rq->bio. π
fr fr, do not just grab whateverrq->biois sitting there when you call this β the I/O completion may have changed it, and that is not the move. keep the original one from theblk_rq_map_userreturn. periodt. π
π SEE ALSO π
- Kernel file
./block/blk-map.c bio_copy_from_iter(9)bio_copy_to_iter(9)bio_uncopy_user(9)bio_copy_kern(9)blk_rq_map_user_iov(9)blk_rq_map_kern(9)
go read those too, iykyk π§π
π cute lil sign-off π
this whole page came from the ./block source, and it's dated October 2026 β so yeah, freshly stamped and everything β. mwah, go unmap those requests responsibly, bestie ππ
π¦ 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