folio_redirty_for_writepage(9)
π folio_redirty_for_writepage(9) β the kernel API manual, bestie edition
okay so you found folio_redirty_for_writepage in the Kernel API Manual and you're like "what is this, why is it here, do I need it" β don't worry, I got you π«Ά this is literally the "jk, never mind, keep it dirty" function and honestly it's giving main character energy for anyone writing a writepage implementation β¨
πΈ NAME πΈ
folio_redirty_for_writepage β Decline to write a dirty folio.
like, you're saying "no thanks bestie, I'm not writing this one" π
π SYNOPSIS π
bool folio_redirty_for_writepage (struct writeback_control *wbc , struct
folio *folio );
so it hands you back a bool, and you feed it a wbc and a folio. that's the whole vibe check π
β¨ ARGUMENTS β¨
wbcβ The writeback control. yes, the actual writeback control struct, she's the boss of this whole operation πfolioβ The folio. the folio in question. the one we're talking about. the star of the show π
π DESCRIPTION π
okay so here's the tea β when a writepage implementation decides that it doesn't want to write folio for some reason β and honestly valid, we've all been there β it should call this function, unlock folio, and return 0.
that's it. that's the whole thing. call it, unlock the folio, return 0, move on with your life. no cap π§
π₯ RETURN π₯
- True if we redirtied the folio. slay, mission accomplished π
- False if someone else dirtied it first. awkward but okay, they beat you to it π
ngl, that True/False distinction is lowkey important β it's literally telling you whether you were the one who re-dirtied it or whether another thread got there first. iykyk π
π¦ SEE ALSO π¦
Kernel file ./mm/page-writeback.c and honestly the whole friend group:
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_mark_dirty(9)folio_wait_writeback(9)folio_wait_writeback_killable(9)folio_wait_stable(9)
like a whole squad of dirty-page besties, go say hi π
and that's the page bestie!! π this one lives in ./mm, dated October 2026, and it's filed under folio_redirty_for_writepage(9) β periodt. go forth and decline to write that folio πβ¨
π¦ 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