wb_start_ba...nd_writeback(9)
π wb_start_ba...nd_writeback(9) π
okay so this is a page from the Kernel API Manual bestie, and it's about kicking off background writeback β like, the kernel's lil "hey go flush some dirty pages sometime soon, no rush" nudge. very behind-the-scenes, very main character of the writeback subsystem honestly π
β¨ NAME β¨
wb_start_background_writeback β start background writeback, that's the whole vibe
π¦ SYNOPSIS π¦
void wb_start_background_writeback (struct bdi_writeback *wb );
πΈ ARGUMENTS πΈ
wbβ thebdi_writbackto write from. yes that's spelled exactly like that in the source, we don't make the rules π it's the writeback thingy you want stuff flushed out of.
β DESCRIPTION β
so this function makes sure that WB_SYNC_NONE background writeback actually happens. like it goes and wakes the vibe up. π₯
here's the important part tho, bestie, listen up β when this function returns, the only thing you're guaranteed is that for the given wb, some IO is happening if we are over the background dirty threshold. that's it. that's the guarantee. it is not promising you a fully synced disk, it is not promising you a clean file, it's just "yeah if things are dirty enough, something is moving." don't @ me π
and good news for the caller: you do not need to hold the sb s_umount semaphore. no semaphore-holding era required, we're chill like that π
π SEE ALSO π
the kernel file ./fs/fs-writeback.c is where all this lives, and here's the whole friend group:
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)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)
ngl the writeback squad is stacked. twenty-three cross-references and every one of them ate. πβ¨
and that's the whole page!! tysm for reading, this came to you from ./fs in the October 2026 era, okay bye bestie π«Άππ§
π¦ 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