__bio_add_page(9)
β¨ __bio_add_page β Kernel API Manual energy β¨
okay so bestie, buckle up, because this one is a tiny little function with a huge main character energy moment in the block layer π this is your friendly rundown from the Kernel API Manual, and yes we're gonna get through every single line of it together π«Ά
πΈ NAME πΈ
__bio_add_page β add page(s) to a bio in a new segment π
like, that's literally the whole vibe: page(s), bio, new segment, slay β¨
π¦ SYNOPSIS π¦
void __bio_add_page (struct bio *bio , struct page *page , unsigned int
len , unsigned int off );
it returns void, so don't go looking for a return value, there isn't one, periodt π
π ARGUMENTS π
bioβ the destination bio, aka where the data is going π― this is the main characterpageβ the start page to add πlenβ the length of the data to add; heads up, it may cross pages π¦offβ the offset of the data relative topage; this one may cross pages too π
π₯ DESCRIPTION π₯
okay so what it actually does: it adds the data at page + off to bio as a new bvec β¨
β οΈ and here's the thing, bestie, listen to me β the caller must ensure that bio has space for another bvec. that's on you, not on the function. it's giving "trust and verify" but mostly "verify" π do the vibe check before you call it, fr fr.
π SEE ALSO π
the whole block-layer friend group showed up, iykyk π
Kernel file ./block/bio.c and, in no particular order because they're all iconic:
bio_reset(9)bio_reuse(9)bio_chain(9)bio_chain_and_submit(9)bio_alloc_bioset(9)bio_kmalloc(9)bio_truncate(9)guard_bio_eod(9)bio_put(9)bio_alloc_clone(9)bio_init_clone(9)bio_full(9)bio_add_virt_nofail(9)bio_add_page(9)bio_add_folio(9)bio_add_vmalloc_chunk(9)bio_add_vmalloc(9)bio_iov_iter_get_pages(9)bio_iov_iter_bounce(9)bio_iov_iter_unbounce(9)bio_await(9)submit_bio_wait(9)bdev_rw_virt(9)bio_copy_data(9)bio_endio(9)bio_split(9)bio_trim(9)bioset_init(9)
and that's the page, bestie π huge shoutout to the source ./block and the October 2026 version of this doc β they ate and left no crumbs π
β¨ see u in the next manpage πΈπ¦
π¦ 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