函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\buffer.c Create Date:2022-07-29 10:45:25
Last Modify:2020-03-18 10:38:29 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:submit_bh_wbc

函数原型:static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, enum rw_hint write_hint, struct writeback_control *wbc)

返回类型:int

参数:

类型参数名称
intop
intop_flags
struct buffer_head *bh
enum rw_hintwrite_hint
struct writeback_control *wbc
3070  BUG_ON(!buffer_locked(bh))
3071  BUG_ON(!buffer_mapped(bh))
3072  BUG_ON(! I/O completion )
3073  BUG_ON(buffer_delay(bh))
3074  BUG_ON(buffer_unwritten(bh))
3079  如果test_set_buffer_req(bh)且op恒等于REQ_OP_WRITEclear_buffer_write_io_error(bh)
3086  bio等于bio_alloc(GFP_NOIO, 1)
3088  device address in 512 byte sectors 等于 start block number size of mapping 右移9位的值
3089  bio_set_dev(bio, b_bdev)
3090  bi_write_hint等于write_hint
3092  bio_add_page(bio, the page this bh is mapped to , size of mapping , bh_offset(bh))
3093  BUG_ON( residual I/O count != size of mapping )
3095  bi_end_io等于end_bio_bh_io_sync
3096  bi_private等于bh
3098  如果buffer_meta(bh)则op_flags或等于REQ_META
3100  如果buffer_prio(bh)则op_flags或等于REQ_PRIO
3102  bsolete, don't use in new code
3105  This allows us to do IO even on the odd last sectors* of a device, even if the block size is some multiple* of the physical sector size
3107  如果wbc
3108  wbc_init_bio(wbc, bio)
3109  wbc_account_cgroup_owner(wbc, the page this bh is mapped to , size of mapping )
3112  submit_bio(bio)
3113  返回:0
调用者
名称描述
__block_write_full_pageWhile block_write_full_page is writing back the dirty buffers under* the page lock, whoever dirtied the buffers may decide to clean them* again at any time
submit_bh