Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\buffer.c Create Date:2022-07-28 20:14:13
Last Modify:2020-03-18 10:38:29 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:submit_bh_wbc

Proto:static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, enum rw_hint write_hint, struct writeback_control *wbc)

Type:int

Parameter:

TypeParameterName
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  If test_set_buffer_req(bh) && op == REQ_OP_WRITE Then clear_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  If buffer_meta(bh) Then op_flags |= REQ_META
3100  If buffer_prio(bh) Then 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  If wbc Then
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  Return 0
Caller
NameDescribe
__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