STRUCT BIO_VEC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 of bv_page. so like, an offset from the beginning of bv_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:

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