Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Look up the bh in this cpu's LRU. If it's there, move it to the head.

Proto:static struct buffer_head *lookup_bh_lru(struct block_device *bdev, sector_t block, unsigned size)

Type:struct buffer_head

Parameter:

TypeParameterName
struct block_device *bdev
sector_tblock
unsignedsize
1297  struct buffer_head * ret = NULL
1300  check_irqs_on()
1301  bh_lru_lock()
1302  When 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 cycle
1303  bh = Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(bhs[i])
1307  If i Then
1315  get_bh(bh)
1316  ret = bh
1317  Break
1320  bh_lru_unlock()
1321  Return ret
Caller
NameDescribe
__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