函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Various filesystems appear to want __find_get_block to be non-blocking

函数原型:static struct buffer_head *__find_get_block_slow(struct block_device *bdev, sector_t block)

返回类型:struct buffer_head

参数:

类型参数名称
struct block_device *bdev
sector_tblock
199  bd_inode等于 will die
200  bd_mapping等于i_mapping
201  struct buffer_head * ret = NULL
206  all_mapped等于1
207  DEFINE_RATELIMIT_STATE(last_warned, HZ, 1)
209  index等于block右移PAGE_SHIFT determines the page size i_blkbits
210  page等于find_get_page_flags(bd_mapping, index, FGP_ACCESSED)
211  如果非page则转到:out
214  加自旋锁
215  如果非page_has_buffers(page)则转到:out_unlock
217  head等于If we *know* page->private refers to buffer_heads (page)
218  bh等于head
219  循环
220  如果非buffer_mapped(bh)则all_mapped等于0
222  否则如果 start block number 恒等于block
223  ret等于bh
224  get_bh(bh)
225  转到:out_unlock
227  bh等于 circular list of page's buffers
228 bh不等于head循环
235  ratelimit_set_flags( & last_warned, ssue num suppressed message on exit )
236  如果all_mapped__ratelimit( & last_warned)则
237  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
245  out_unlock :
246  自旋锁解锁
247  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
248  out :
249  返回:ret
调用者
名称描述
__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