try_to_writeback_inodes_sb(9)
π« try_to_writeback_inodes_sb π«
okay so bestie, welcome to the Kernel API Manual β this one's a lil kernel function and honestly it's giving "gentle nudge" energy, not "do the whole thing" energy. you're gonna get it, i promise π«Ά
β¨ NAME β¨
try_to_writeback_inodes_sb β try to start writeback if none underway
like, try. it's right there in the name, she's not making promises π
πΈ SYNOPSIS πΈ
void try_to_writeback_inodes_sb (struct super_block *sb , enum wb_reason
reason );
no return value, no drama, just vibes and a void. periodt β¨
π ARGUMENTS π
sbβ the superblock. yep, that superblock, the main character πreasonβ the reason why some writeback work was initiated. it's anenum wb_reason, so like, the kernel wants receipts on why we're even doing this π
π¦ DESCRIPTION π¦
so here's the whole bit: this function invokes __writeback_inodes_sb_nr if no writeback is currently underway.
that's it. that's the function. she checks the vibe first β if the writeback party is already going, she does not crash it (rude), she just doesn't start a second one. no cap. if it's quiet though? she calls __writeback_inodes_sb_nr and gets things moving π
lowkey iconic behavior honestly β knowing when not to act is a whole skill π
π₯ SEE ALSO π₯
Kernel file ./fs/fs-writeback.c plus this whole friend group right here β like, the entire writeback gc, no crumbs:
inode_io_list_move_locked(9)wb_wait_for_completion(9)inode_cgwb_move_to_attached(9)locked_inode_to_wb_and_lock_list(9)inode_to_wb_and_lock_list(9)inode_switch_wbs(9)cleanup_offline_cgwb(9)wbc_attach_and_unlock_inode(9)wbc_attach_fdatawrite_inode(9)wbc_detach_inode(9)wbc_account_cgroup_owner(9)wb_split_bdi_pages(9)bdi_split_work_to_wbs(9)cgroup_writeback_by_id(9)cgroup_writeback_umount(9)wb_start_background_writeback(9)filemap_dontcache_kick_writeback(9)__mark_inode_dirty(9)writeback_inodes_sb_nr(9)writeback_inodes_sb(9)sync_inodes_sb(9)write_inode_now(9)sync_inode_metadata(9)
that's the whole page bestie, mwah π this one lives in ./fs and the version date is October 2026 β so if you're reading this in a kernel tree, congrats, you're on time for once π§β¨ go read fs-writeback.c, it's literally right there π
π¦ 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