函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Install 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.

函数原型:static void bh_lru_install(struct buffer_head *bh)

返回类型:void

参数:

类型参数名称
struct buffer_head *bh
1270  evictee等于bh
1274  check_irqs_on()
1275  bh_lru_lock()
1277  b等于this_cpu_ptr( & bh_lrus)
1278 i小于Per-cpu buffer LRU implementation. To reduce the cost of __find_get_block().* The bhs[] array is sorted - newest buffer is at bhs[0]. Buffers have their* refcount elevated by one when they're in an LRU. A buffer can only appear循环
1279  swap - swap values of @a and @b*@a: first value*@b: second value(evictee, bhs[i])
1280  如果evictee恒等于bh
1281  bh_lru_unlock()
1282  返回
1286  get_bh(bh)
1287  bh_lru_unlock()
1288  brelse(evictee)
调用者
名称描述
__find_get_blockPerform 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