folio_wait_writeback(9)
πΎ folio_wait_writeback(9) β bestie edition
Okay so this is from the Kernel API Manual, and the function is folio_wait_writeback(9). Strap in, it's a short one but it's lowkey doing Important Work. π«Ά
β¨ NAME β¨
folio_wait_writeback β literally just sit there and wait for a folio to finish its writeback era. π
πΈ SYNOPSIS πΈ
void folio_wait_writeback (struct folio *folio );
π ARGUMENTS π
folioβ the folio you're waiting on, aka the main character of this whole situation. π¦
π DESCRIPTION π
So if the folio is currently in its "being written back to storage" phase, you wait for that I/O to complete. That's it. That's the whole vibe check. No cap, it's that simple. β¨
π΄ CONTEXT π΄
Okay bestie, read this part carefully because it's giving important:
- It sleeps. Yes, fr fr, this one actually blocks. π΄
- It must be called in process context, and with no spinlocks held. Not negotiable, don't try it. π
- The caller should hold a reference on the folio. Hold onto your girl. π«Ά
- And here's the little plot twist: if the folio is not locked, writeback may start again after writeback has finished. Like it said "I'm done" and then immediately got back in the group chat. π So lock it if you care about that.
π₯ SEE ALSO π₯
Kernel file ./mm/page-writeback.c, plus this whole friend group of functions β go say hi to all of them, every single one, no skipping:
node_dirtyable_memory(9)global_dirtyable_memory(9)domain_dirty_limits(9)global_dirty_limits(9)node_dirty_limit(9)node_dirty_ok(9)__wb_calc_thresh(9)balance_dirty_pages_ratelimited_flags(9)balance_dirty_pages_ratelimited(9)wb_over_bg_thresh(9)tag_pages_for_writeback(9)writeback_iter(9)filemap_dirty_folio(9)folio_redirty_for_writepage(9)folio_mark_dirty(9)folio_wait_writeback_killable(9)folio_wait_stable(9)
Also: if you wanted the version of this that can be interrupted by a signal, that's folio_wait_writeback_killable(9) up there β she's built different. π
And that's the whole page, bestie! π§ This icon of a manpage comes straight out of ./mm, dated October 2026 β slay, mark your calendars. π Mwah, go wait on that writeback. πβ
π¦ 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