函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\readahead.c Create Date:2022-07-27 15:35:37
Last Modify:2020-03-17 21:13:07 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:read_pages

函数原型:static int read_pages(struct address_space *mapping, struct file *filp, struct list_head *pages, unsigned int nr_pages, gfp_t gfp)

返回类型:int

参数:

类型参数名称
struct address_space *mapping
struct file *filp
struct list_head *pages
unsigned intnr_pages
gfp_tgfp
123  blk_start_plug( & plug)
125  如果readpages
126  ret等于readpages(filp, mapping, pages, nr_pages)
128  put_pages_list(pages)
129  转到:out
132 page_idx小于nr_pages循环
133  page等于lru_to_page(pages)
134  删除链表项
135  如果非add_to_page_cache_lru(page, mapping, Our offset within mapping. , gfp)则readpage(filp, page)
137  put_page(page)
139  ret等于0
141  out :
142  blk_finish_plug( & plug)
144  返回:ret
调用者
名称描述
__do_page_cache_readahead__do_page_cache_readahead() actually reads a chunk of disk. It allocates* the pages first, then submits them for I/O. This avoids the very bad* behaviour which would occur if page allocations are causing VM writeback.