bio_add_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« bio_add_page(9) πŸ’«

okay so this is a page straight out of the Kernel API Manual, and it's literally all about bio_add_page β€” the little function that tries to shove page(s) into a bio 🫢


✨ NAME ✨

bio_add_page β€” attempt to add page(s) to bio


πŸŽ€ SYNOPSIS πŸŽ€

int bio_add_page (struct bio *bio , struct page *page , unsigned int len
, unsigned int offset );

🌸 ARGUMENTS 🌸

  • bio β€” the destination bio, aka where the pages are headed πŸ’Œ
  • page β€” the start page you're adding
  • len β€” the vec entry length, and ngl it may cross pages
  • offset β€” the vec entry offset relative to the page, which, bestie, may also cross pages

πŸ¦‹ DESCRIPTION πŸ¦‹

So the whole vibe here is: attempt to add page(s) to the bio_vec maplist ✨

And it will only fail in two situations, no cap:

  1. bio->bi_vcnt == bio->bi_max_vecs
  2. it's a cloned bio
like... that's it. that's the whole failure criteria. if neither of those is true, it slays πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./block/bio.c, plus the whole friend group:


okay that's the whole page!! πŸŽ€ this came from the ./block corner of the kernel and it's dated October 2026 β€” mwah, iconic, no notes πŸ’–βœ¨πŸŒ·

πŸ“¦ where this page comes from