函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\fs-writeback.c Create Date:2022-07-29 10:41:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sync_inodes_sb - sync sb inode pages*@sb: the superblock* This function writes and waits on any dirty inode belonging to this* super_block.

函数原型:void sync_inodes_sb(struct super_block *sb)

返回类型:void

参数:

类型参数名称
struct super_block *sb
2531  bdi等于s_bdi
2532  DEFINE_WB_COMPLETION(done, bdi)
2533  struct wb_writeback_work work = {sb = sb, sync_mode = Wait on every mapping , nr_pages = LONG_MAX, range_cyclic = 0, set if the caller waits = & done, why was writeback initiated? = WB_REASON_SYNC, sync(2) WB_SYNC_ALL writeback = 1, }
2548  如果bdi恒等于noop_backing_dev_info则返回
2550  WARN_ON(!In all implementations count != 0 means locked )
2553  bdi_down_write_wb_switch_rwsem(bdi)
2554  bdi_split_work_to_wbs(bdi, & work, false)
2555  wb_wait_for_completion - wait for completion of bdi_writeback_works*@done: target wb_completion* Wait for one or more work items issued to @bdi with their ->done field* set to @done, which should have been initialized with* DEFINE_WB_COMPLETION()
2556  bdi_up_write_wb_switch_rwsem(bdi)
2558  The @s_sync_lock is used to serialise concurrent sync operations* to avoid lock contention problems with concurrent wait_sb_inodes() calls.* Concurrent callers will block on the s_sync_lock rather than doing contending* walks
调用者
名称描述
__sync_filesystemDo the filesystem syncing work
sync_inodes_one_sb