bio_advance(9)
π bio_advance β Kernel API Manual β¨
okay bestie, so you're in the kernel docs, section 9, and the star of the show is bio_advance. no cap, this one's a little workhorse and she eats every time π«Ά
πΈ NAME πΈ
bio_advance β increment/complete a bio by some number of bytes π«
π SYNOPSIS π
void bio_advance (struct bio *bio , unsigned int nbytes );
literally just two args and she returns void. lowkey iconic. π
π¦ ARGUMENTS π¦
bioβ the bio you wanna advance, bestie. that's the one getting moved along.nbytesβ the number of bytes to complete. how far forward we're pushing it. π
β¨ DESCRIPTION β¨
so here's the vibe check π β this updates bi_sector, bi_size and bi_idx.
and like, if the number of bytes you're completing doesn't align with a bvec boundary? then bv_len and bv_offset will get updated on the last bvec as well. yeah, she does the fiddly edge-case work too, no complaints. π
after that, bio will then represent the remaining, uncompleted portion of the io. so it's giving "what's left" energy, fr fr. π§
π SEE ALSO π
the kernel file ./include/linux/bio.h plus the whole friend group:
struct folio_iter(9)bio_for_each_folio_all(9)bio_next_split(9)bio_in_atomic(9)bio_complete_in_task(9)bio_endio_status(9)bio_iov_bounce_nr_vecs(9)bio_add_max_vecs(9)bio_is_zone_append(9)
go say hi, they all live in ./include/linux and they're all super friendly. π
ngl bestie, keep thosebi_sector,bi_size,bi_idx,bv_lenandbv_offsetupdates in mind β those are the exact fields she touches. no invented behaviour here, just what the page says. π
β that's a wrap! this page comes to you from ./include/linux, dated October 2026, and it's bio_advance(9) all the way down. mwah, go read your bios ππ
π¦ 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