STRUCT BIO_VEC(9)
πΈ struct bio_vec(9) πΈ
okay so bestie, you're in the Kernel API Manual and today's main character is struct bio_vec β literally just a contiguous range of physical memory addresses. that's it, that's the vibe. π
β¨ SYNOPSIS β¨
like, here's the whole entire struct, no cap:
struct bio_vec {
struct page *bv_page;
unsigned int bv_len;
unsigned int bv_offset;
};
she's small. she's iconic. she has three fields and zero drama. π
π¦ Members π¦
bv_pageβ the first page associated with the address range. like the head of the friend group, everyone else follows her. πbv_lenβ how many bytes are in the address range. the length. the amount. the whole measurement situation. β¨bv_offsetβ where the address range starts, relative to the start ofbv_page. so like, an offset from the beginning ofbv_page, iykyk. π«Ά
π₯ Description π₯
okay so this is the part that actually slaps β all the pages within a bio_vec, starting from bv_page, are contiguous, meaning you can simply iterate over them. no jumping around, no hunting, no "where did that page go" energy. just vibes and a straight walk through memory. the manpage literally says to see bvec_advance for that iteration moment. β
so yeah: contiguous pages, simple iteration, bvec_advance does the little walk. periodt. π
π SEE ALSO π
the kernel file ./include/linux/bvec.h and her whole bestie lineup:
bvec_set_page(9)bvec_set_folio(9)bvec_set_virt(9)bvec_folio(9)bvec_kmap_local(9)memcpy_from_bvec(9)memcpy_to_bvec(9)memzero_bvec(9)bvec_virt(9)bvec_phys(9)
go read all of them, bestie, they're all so good. π
fr fr, only contiguous ranges allowed in here. that's the whole point. don't come in here with scattered pages, it's giving chaos and we don't do chaos. π
and that's the whole page!! π brought to you by ./include/linux β October 2026 β shoutout to the source and the date, mwah, slay, bye 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