folio_wait_writeback(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’Ύ 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:


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