writeback_inodes_sb_nr(9)
π writeback_inodes_sb_nr(9) β like, the Kernel API Manual, bestie
okay so this is writeback_inodes_sb_nr from the kernel API manual, and we're gonna get into it β¨ no cap.
πΈ NAME πΈ
writeback_inodes_sb_nr β writeback dirty inodes from a given super_block. that's the whole vibe, that's the assignment π
π SYNOPSIS π
void writeback_inodes_sb_nr (struct super_block *sb , unsigned long nr ,
enum wb_reason reason );
like, look at her. iconic signature. no notes π
π¦ ARGUMENTS π¦
sbβ the superblock. the main character of this whole situation, fr fr.nrβ the number of pages to write. that's the ask, that's the dream π«reasonβ the reason why some writeback work got initiated. yes we're documenting the why, we're being thorough, we're that girl π«Ά
β¨ DESCRIPTION β¨
so basically you start writeback on some inodes on this super_block. and like β and this is the important part, bestie, don't skip it β no guarantees are made on how many (if any) will be written. could be a lot, could be zero, could be a whole vibe. π and ALSO, this function does not wait for IO completion of submitted IO. it sends it and dips. it's giving "I said what I said" energy π
lowkey important: it's fire-and-forget. do not assume anything actually got written, and do not assume anything is done when it returns. periodt.
π SEE ALSO π
the kernel file ./fs/fs-writeback.c, plus literally all of these besties:
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(9)try_to_writeback_inodes_sb(9)sync_inodes_sb(9)write_inode_now(9)sync_inode_metadata(9)
go read them, iykyk ππ
and that's the page, bestie π sign-off time: this one comes from the ./fs corner of the world, dated October 2026 β mwah, slay, go write some inodes πβ¨π₯
π¦ 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