bio_next_split(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« 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 of bio. 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:

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