wbc_attach_fdatawrite_inode(9)
π wbc_attach_fdatawrite_inode β a whole vibe
okay so bestie, welcome to the Kernel API Manual β¨ we're talking about wbc_attach_fdatawrite_inode(9) today and honestly? it's giving "small function, big responsibilities." let's get into it π
β¨ NAME β¨
wbc_attach_fdatawrite_inode β the glow-up that associates a wbc and an inode together, specifically for fdatawrite π«Ά
πΈ SYNOPSIS πΈ
void wbc_attach_fdatawrite_inode (struct writeback_control *wbc , struct
inode *inode );
like, that's the whole signature. no cap, that's it. returns void β she doesn't return anything, she just does π
π¦ ARGUMENTS π¦
wbcβ thewriteback_controlof interest π like, the one you actually care about, the main characterinodeβ the target inode π― the one we're gonna be linking up
π DESCRIPTION π
so here's the tea: this function is meant to be used by filemap_writeback, which is literally an alternative entry point into the writeback code, iykyk π₯
and what she does first β before anything else β is ensure the inode is associated with a bdi_writeback, and then she attaches it to wbc. that's the whole job. two steps. iconic behaviour. periodt β¨
π SEE ALSO π
- Kernel file
./fs/fs-writeback.cβ go read it, bestie, it's right there π 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_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)sync_inode_metadata(9)
π friendly reminder: this is a kernel function, so bestie please do not call it from your random userspace C homework. she lives in ./fs and she knows it.
okay that's the whole page!! mwah π coming at you from ./fs, dated October 2026, and yes the title is still wbc_attach_fdatawrite_inode(9) because we don't do rebrands here π bye bestie, go read the source π§ββοΈπ
π¦ 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