folio_batch_add(9)
π folio_batch_add(9) β like, the Kernel API Manual, bestie
okay so real talk, this one is a tiny little function from the kernel API manual and honestly it's giving "small but mighty" π¦. It's the kind of thing you call a million times and never think about, and yet β no cap β she's iconic.
β¨ NAME β¨
folio_batch_add β literally just adds a folio to a batch. that's it. that's the whole job. and she does it perfectly π
πΈ SYNOPSIS πΈ
unsigned folio_batch_add (struct folio_batch *fbatch , struct folio *folio );
look at her. two args, returns an unsigned. no drama. main character energy fr fr π
π ARGUMENTS π
fbatchβ the folio batch. the actual pile of folios you're stuffing things into. she's the container, the vibe check, the whole venue π«Άfolioβ the folio you're adding. the new arrival. the guest of honour arriving at the party π
π DESCRIPTION π
so the folio gets added to the end of the batch β like, appended, queued up, behind whatever was already there. no skipping the line, no cutting π
but listen, and this is the important part: the batch must have been initialised beforehand using folio_batch_init. like, you can't just roll up with an uninitialised batch and start tossing folios in there. that's not the move. do the folio_batch_init first, then come add your folios π
lowkey do not skip the init step. that's the whole requirement. it's stated right there and we're respecting it π
β RETURN β
the function returns the number of slots still available β so after the add, you get told how much room is left in the batch. it's like the little counter on the app telling you how many seats are still free ποΈβ¨
π¦ SEE ALSO π¦
- Kernel file
./include/linux/folio_batch.h struct folio_batch(9)folio_batch_init(9)folio_batch_next(9)
go read folio_batch_init(9) first, bestie, i'm literally begging π§π
and that's the page!! source & version business: ./include/linux, dated October 2026 β so mark your calendars, mwah ππΈ stay hydrated, initialise your batches, and slay π
β¨
π¦ 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