Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\iov_iter.c Create Date:2022-07-28 06:23:07
Last Modify:2022-05-21 11:43:54 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:iov_iter_get_pages

Proto:ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages, size_t maxsize, unsigned maxpages, size_t *start)

Type:ssize_t

Parameter:

TypeParameterName
struct iov_iter *i
struct page **pages
size_tmaxsize
unsignedmaxpages
size_t *start
1314  If maxsize > count Then maxsize = count
1317  If Value for the false possibility is greater at compile time(iov_iter_is_pipe(i)) Then Return pipe_get_pages(i, pages, maxsize, maxpages, start)
1319  If Value for the false possibility is greater at compile time(iov_iter_is_discard(i)) Then Return -EFAULT
1322  iterate_all_kinds(i, maxsize, v, ({unsignedlongaddr = (unsignedlong)iov_base;size_tlen = iov_len + ( * start = addr & (PAGE_SIZE - 1));intn;intres;If len > maxpages * PAGE_SIZE Then len = maxpages * PAGE_SIZE;addr &= ~(PAGE_SIZE - 1);n = DIV_ROUND_UP(len, PAGE_SIZE);res = get_user_pages_fast(addr, n, iov_iter_rw(i) != WRITE ? check pte is writable : 0, pages);If Value for the false possibility is greater at compile time(res < 0) Then Return res;Return If res == n Then len Else res * PAGE_SIZE - * start;0;}), ({ * start = bv_offset;get_page( * pages = bv_page);Return bv_len;}), ({Return - EFAULT;}))
1347  Return 0
Caller
NameDescribe
dio_refill_pagesGo grab and pin some userspace pages. Typically we'll get 64 at a time.