bio_next_split(9)
π« bio_next_split β kernel API manual, but make it make sense π«
okay bestie, welcome to bio_next_split(9), straight out of the Kernel API Manual β¨ this one's short and sweet and honestly kind of a slay β it's the "gimme the next chunk of this bio, and yeah split it if you gotta" function π
πΈ NAME πΈ
bio_next_split β get next @sectors from a bio, splitting if necessary π
like, it literally does what it says on the tin, no cap.
β¨ SYNOPSIS β¨
struct bio * bio_next_split (struct bio *bio , int sectors , gfp_t gfp ,
struct bio_set *bs );
look at her. iconic signature. four args, one struct bio * out the door π«Ά
π¦ ARGUMENTS π¦
bioβ the bio you're splitting, bestie. this is the one getting carved up βοΈsectorsβ how many sectors you wanna split off the front ofbio. front only, we're not chaotic πgfpβ the gfp mask π± (yes, that one, the allocation-flags one, you know her)bsβ the bio set you're allocating from π§
β RETURN β
it hands you back a bio representing the next sectors of bio π
aaaand the plot twist: if the bio is smaller than sectors, it returns the original bio unchanged. no splitting, no drama, just the same pointer back at you π periodt.
π SEE ALSO π
kernel file ./include/linux/bio.h β and the whole friend group:
bio_advance(9)struct folio_iter(9)bio_for_each_folio_all(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 read those too, they're all lowkey important π
ngl this page is short but it ate. remember the front-splitting and the unchanged-original-bio thing, those are the whole vibe check π₯
and that's the whole page, bestie π
signing off from ./include/linux β October 2026 β this has been your girl, bio_next_split(9), stay hydrated and may all your bios be bigger than your sectors ππ
π¦ 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