函数逻辑报告

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

函数名称:__writeback_inodes_sb_nr

函数原型:static void __writeback_inodes_sb_nr(struct super_block *sb, unsigned long nr, enum wb_reason reason, bool skip_if_busy)

返回类型:void

参数:

类型参数名称
struct super_block *sb
unsigned longnr
enum wb_reasonreason
boolskip_if_busy
2453  bdi等于s_bdi
2454  DEFINE_WB_COMPLETION(done, bdi)
2455  struct wb_writeback_work work = {sb = sb, sync_mode = Don't wait on anything , tagged_writepages = 1, set if the caller waits = & done, nr_pages = nr, why was writeback initiated? = reason, }
2464  如果非bdi_has_dirty_io(bdi)或bdi恒等于noop_backing_dev_info则返回
2466  WARN_ON(!In all implementations count != 0 means locked )
2468  bdi_split_work_to_wbs(s_bdi, & work, skip_if_busy)
2469  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()
调用者
名称描述
writeback_inodes_sb_nrwriteback_inodes_sb_nr - writeback dirty inodes from given super_block*@sb: the superblock*@nr: the number of pages to write*@reason: reason why some writeback work initiated* Start writeback on some inodes on this super_block
try_to_writeback_inodes_sbry_to_writeback_inodes_sb - try to start writeback if none underway*@sb: the superblock*@reason: reason why some writeback work was initiated* Invoke __writeback_inodes_sb_nr if no writeback is currently underway.