函数逻辑报告

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

函数名称:Perform a pagecache lookup for the matching buffer. If it's there, refresh* it in the LRU and mark it as accessed. If it is not present then return* NULL

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

返回类型:struct buffer_head

参数:

类型参数名称
struct block_device *bdev
sector_tblock
unsignedsize
1332  bh等于Look up the bh in this cpu's LRU. If it's there, move it to the head.
1334  如果(bh == NULL)则
1336  bh等于Various filesystems appear to want __find_get_block to be non-blocking
1337  如果bhInstall a buffer_head into this cpu's LRU. If not already in the LRU, it is* inserted at the front, and the buffer_head at the back if any is evicted.* Or, if already in the LRU it is moved to the front.
1339  否则touch_buffer(bh)
1342  返回:bh
调用者
名称描述
write_boundary_blockCalled when we've recently written block `bblock', and it is known that* `bblock' was for a buffer_boundary() buffer. This means that the block at* `bblock + 1' is probably a dirty indirect block. Hunt it down and, if it's* dirty, schedule it for IO
__getblk_slow
__getblk_gfp__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