函数逻辑报告

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

函数名称:For a data-integrity writeout, we need to wait upon any in-progress I/O* and then start new I/O and then wait upon it. The caller must have a ref on* the buffer_head.

函数原型:int __sync_dirty_buffer(struct buffer_head *bh, int op_flags)

返回类型:int

参数:

类型参数名称
struct buffer_head *bh
intop_flags
3197  ret等于0
3199  WARN_ON(atomic_read( & users using this buffer_head ) < 1)
3200  lock_buffer(bh)
3201  如果test_clear_buffer_dirty(bh)则
3202  get_bh(bh)
3203  I/O completion 等于end_buffer_write_sync
3204  ret等于submit_bh(REQ_OP_WRITE, op_flags, bh)
3205  wait_on_buffer(bh)
3206  如果非ret且非Emit the buffer bitops functions. Note that there are also functions* of the form "mark_buffer_foo()". These are higher-level functions which* do something in addition to setting a b_state bit.ret等于负EIO
3208  否则
3209  unlock_buffer(bh)
3211  返回:ret
调用者
名称描述
sync_dirty_buffer