bio_advance(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

go say hi, they all live in ./include/linux and they're all super friendly. πŸ’–


ngl bestie, keep those bi_sector, bi_size, bi_idx, bv_len and bv_offset updates 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