netfs_folioq_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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