folioq_folio_order(9)
π NAME π
okay so bestie, this is folioq_folio_order(9) from the Kernel API Manual, and it's giving exactly one iconic job: get the order of a folio from a folio queue segment. That's the whole vibe. π
β¨ SYNOPSIS β¨
unsigned int folioq_folio_order (const struct folio_queue *folioq ,
unsigned int slot );
π ARGUMENTS π
folioqβ the segment to access. It's the folio queue segment you're working with, bestie.slotβ the folio slot to access. The exact slot, no cap.
π¦ DESCRIPTION π¦
so like, this function retrieves the order of the folio in the specified slot from a folio queue segment. Easy. But β and this is the important part β no bounds check is made. None. Zero. So don't expect it to validate your slot for you. π
Also: if the slot hasn't been added into yet, the order returned will be 0. That's the rule. β
β οΈ no bounds check happens here, so keep your vibes valid and don't assume the function is checking anything for you. π
π SEE ALSO π
Kernel file: ./include/linux/folio_queue.h
go read the whole friend group too, they're all linked here:
folioq_init(9)folioq_nr_slots(9)folioq_count(9)folioq_full(9)folioq_is_marked(9)folioq_mark(9)folioq_unmark(9)folioq_is_marked2(9)folioq_mark2(9)folioq_unmark2(9)folioq_append(9)folioq_append_mark(9)folioq_folio(9)folioq_folio_size(9)folioq_clear(9)
xoxo bestie π source/version: ./include/linux Β· date: October 2026 Β· page: folioq_folio_order(9) π«Ά
π¦ 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