函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__bread_gfp() - reads a specified block and returns the bh*@bdev: the block_device to read from*@block: number of block*@size: size (in bytes) to read*@gfp: page allocation flag* Reads a specified block, and returns buffer head that contains it

函数原型:struct buffer_head *__bread_gfp(struct block_device *bdev, sector_t block, unsigned size, gfp_t gfp)

返回类型:struct buffer_head

参数:

类型参数名称
struct block_device *bdev
sector_tblock
unsignedsize
gfp_tgfp
1396  bh等于__getblk_gfp() will locate (and, if necessary, create) the buffer_head* which corresponds to the passed block_device, block and size. The* returned buffer has its reference count incremented.* __getblk_gfp() will lock up the machine if grow_dev_page's
1398  如果此条件成立可能性大(为编译器优化)(bh)且非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.bh等于__bread_slow(bh)
1400  返回:bh
调用者
名称描述
sb_bread
sb_bread_unmovable
__bread__bread() - reads a specified block and returns the bh*@bdev: the block_device to read from*@block: number of block*@size: size (in bytes) to read* Reads a specified block, and returns buffer head that contains it.