Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\direct-io.c Create Date:2022-07-28 20:15:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Go grab and pin some userspace pages. Typically we'll get 64 at a time.

Proto:static inline int dio_refill_pages(struct dio *dio, struct dio_submit *sdio)

Type:int

Parameter:

TypeParameterName
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  If ret < 0 && At block_in_file. changes && op == REQ_OP_WRITE Then
177  page = ZERO_PAGE(0)
183  If from get_user_pages() == 0 Then 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  Return 0
194  If ret >= 0 Then
195  iov_iter_advance(iter, ret)
196  ret += from
197  xt page to process = 0
198  last valid page + 1 = ( ret + PAGE_SIZE - 1) / PAGE_SIZE
199  to = ( ret - 1 & PAGE_SIZE - 1 ) + 1
200  Return 0
202  Return ret
Caller
NameDescribe
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.