函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Go grab and pin some userspace pages. Typically we'll get 64 at a time.

函数原型:static inline int dio_refill_pages(struct dio *dio, struct dio_submit *sdio)

返回类型:int

参数:

类型参数名称
struct dio *dio
struct dio_submit *sdio
173  ret等于iov_iter_get_pages(iter, page buffer , LONG_MAX, How many user pages to map in one call to get_user_pages(). This determines* the size of a structure in the slab cache, & from)
176  如果ret小于0且At block_in_file. changes op恒等于REQ_OP_WRITE
177  page等于ZERO_PAGE(0)
183  如果 from get_user_pages() 恒等于0则 from get_user_pages() 等于ret
185  get_page(page)
186  page buffer [0]等于page
187  xt page to process 等于0
188  last valid page + 1 等于1
189  from等于0
190  to等于PAGE_SIZE
191  返回:0
194  如果ret大于等于0则
195  iov_iter_advance(iter, ret)
196  ret加等于from
197  xt page to process 等于0
198  last valid page + 1 等于retPAGE_SIZE减1的差除PAGE_SIZE
199  to等于ret减1按位与PAGE_SIZE减1的值加1
200  返回:0
202  返回:ret
调用者
名称描述
dio_get_pageGet another userspace page. Returns an ERR_PTR on error. Pages are* buffered inside the dio so that we can call get_user_pages() against a* decent number of pages, less frequently. To provide nicer use of the* L1 cache.