sync_inode_metadata(9)
β¨ sync_inode_metadata β¨
okay so bestie, welcome to the Kernel API Manual β this one's a lil function called sync_inode_metadata, and no cap, it's lowkey important. let's get into it π
πΈ NAME πΈ
sync_inode_metadata β write an inode to disk. that's it. that's the whole vibe β¨
π SYNOPSIS π
int sync_inode_metadata (struct inode *inode , int wait );
literally the entire signature, no notes π«Ά
π ARGUMENTS π
inodeβ the inode you wanna sync, bestie. the main character of this whole operation πwaitβ wait for I/O to complete. yes, fr fr, it actually waits. patience is a virtue or whatever π§
π¦ DESCRIPTION π¦
so what does it do. okay so: it writes an inode to disk, and then β this is the cute part β it adjusts its dirty state after completion. like, after it's done. after the write. iconic behavior honestly π
no crumbs left behind, the dirty state gets fixed up when the I/O finishes. slay π
π₯ NOTE π₯
heads up bestie, this is a big caveat: it only writes the actual inode. no associated data. no other metadata. just the inode. that's the whole meal. don't @ me when your data isn't there, because the manual said so π
read that note twice, ngl. it's giving "i did exactly what you asked and nothing more" π
π SEE ALSO π
okay so this is the deep lore section β the Kernel file ./fs/fs-writeback.c and honestly, look at this friend group. this is the whole group chat:
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)try_to_writeback_inodes_sb(9)sync_inodes_sb(9)write_inode_now(9)
all of them. every single one. iykyk π
and that's the page, bestie!! π this lil gem lives in ./fs, dated October 2026, and it's filed under sync_inode_metadata(9) β so next time u need it, u know exactly where to look πβ¨ go sync those inodes, u got this π«Ά
π¦ 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