folio_wait_...ack_killable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_wait_writeback_killable(9) β€” the "please finish writing, bestie" page

okay so this is a page from the Kernel API Manual and it's all about folio_wait_writeback_killable β€” like yes the page header lowkey truncates it to folio_wait_...ack_killable(9) because man page headers are dramatic like that, but bestie the real name is right there in the NAME section. let's go πŸŽ€


✨ NAME ✨

folio_wait_writeback_killable β€” wait for a folio to finish writeback. that's it. that's the whole vibe. πŸ’–


🌸 SYNOPSIS 🌸

int folio_wait_writeback_killable (struct folio *folio );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • folio β€” the folio you're waiting on. your little guy. the one you're obsessed with. 🫢

πŸ”₯ DESCRIPTION πŸ”₯

so if the folio is currently being written back to storage (like, it's mid-glow-up, being saved to disk), you wait for the I/O to complete β€” OR for a fatal signal to arrive. whichever hits first, no cap. 😭


πŸ’€ CONTEXT πŸ’€

okay this part matters, so listen:

  • it sleeps πŸ’€
  • it must be called in process context
  • and with no spinlocks held β€” none. zero. don't do it. πŸ™ˆ
  • the caller should hold a reference on the folio
  • and heads up: if the folio is not locked, writeback may start again after writeback has finished. it's giving "we're so back" energy, it can literally loop back around. so lock it if you don't want that. ⭐

🌈 RETURN 🌈

  • 0 on success β€” slay, it worked πŸ’…
  • -EINTR if we get a fatal signal while waiting β€” the wait got interrupted, rip πŸ˜”

πŸ‘‘ SEE ALSO πŸ‘‘

the source of all this lore lives in the kernel file ./mm/page-writeback.c, and if you want the whole friend group:


fr fr this one's a sleeper (literally) β€” you're blocking, so don't call it from anywhere spicy. no spinlocks. i'm serious. πŸ“

and that's the page!! mwah πŸ’œ this little gem comes to you courtesy of ./mm, dated October 2026, and it's the folio_wait_...ack_killable(9) page β€” yes, still truncated in the footer, no I will not be explaining that, iykyk 🧚✨

πŸ“¦ where this page comes from