netfs_folioq_alloc(9)
π netfs_folioq_alloc(9) π
okay so bestie, welcome to the Kernel API Manual β yes we're literally in the kernel now, and this one's from the netfs corner of it. it's netfs_folioq_alloc(9) and it's giving "small function, big responsibility" energy. let's get into it π«Ά
β¨ NAME β¨
netfs_folioq_alloc β Allocate a folio_queue struct
like, that's the whole gig. it makes a folio_queue struct appear. no cap.
πΈ SYNOPSIS πΈ
struct folio_queue * netfs_folioq_alloc (unsigned int rreq_id , gfp_t gfp , unsigned int trace );
three args, all of them matter, don't skip any π
π ARGUMENTS π
rreq_idβ Associated debugging ID for tracing purposes. it's literally just there so you can find your request again in the traces later, iykyk πgfpβ Allocation constraints. this is the vibe check for how the memory gets grabbed β you gotta tell it what's allowed πtraceβ Trace tag to indicate the purpose of the allocation. so when you're scrolling the trace log at 2am you know why this thing exists π
π¦ DESCRIPTION π¦
so what does it actually do? Allocate, initialise and account the folio_queue struct β all three, one call, iconic β and then log a trace line to mark the allocation. that's it, that's the function. a little alloc, a little setup, a little bookkeeping, a little "hey I'm here" in the trace log. main character energy tbh π
β SEE ALSO β
- Kernel file
./fs/netfs/rolling_buffer.cβ go read the source, it's literally right there π netfs_folioq_free(9)β the one you call when you're done, because we free our allocations in this house π§
fr fr though: you allocated it, so you free it. netfs_folioq_free(9) exists for a reason and it's not decoration π
and that's the page! brought to you by the fine folks over in ./fs/netfs, dated October 2026, in the Kernel API Manual β stay hydrated, free your folios, and slay the day bestie ππΈπ
π¦ 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