函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__getblk_slow

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

返回类型:struct buffer_head

参数:

类型参数名称
struct block_device *bdev
sector_tblock
unsignedsize
gfp_tgfp
1066  如果此条件成立可能性小(为编译器优化)(size & (bdev_logical_block_size(bdev) - 1) || (size < 512 || size > PAGE_SIZE))则
1068  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
1070  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
1073  dump_stack()
1074  返回:NULL
1077  循环
1081  bh等于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
1082  如果bh则返回:bh
1085  ret等于Create buffers for the specified block device block's page. If* that page was dirty, the buffers are set dirty also.
1086  如果ret小于0则返回:NULL
调用者
名称描述
__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