函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\iov_iter.c Create Date:2022-07-27 07:20:14
Last Modify:2022-05-21 11:43:54 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:iov_iter_get_pages

函数原型:ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages, size_t maxsize, unsigned maxpages, size_t *start)

返回类型:ssize_t

参数:

类型参数名称
struct iov_iter *i
struct page **pages
size_tmaxsize
unsignedmaxpages
size_t *start
1314  如果maxsize大于countmaxsize等于count
1317  如果此条件成立可能性小(为编译器优化)(iov_iter_is_pipe(i))则返回:pipe_get_pages(i, pages, maxsize, maxpages, start)
1319  如果此条件成立可能性小(为编译器优化)(iov_iter_is_discard(i))则返回:负EFAULT
1322  iterate_all_kinds(i, maxsize, v, ({unsignedlongaddr = (unsignedlong)iov_base;size_tlen = iov_len + ( * start = addr & (PAGE_SIZE - 1));intn;intres;如果len大于maxpagesPAGE_SIZElen = 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);如果此条件成立可能性小(为编译器优化)(res < 0)则返回res;返回:如果res恒等于nlen否则resPAGE_SIZE - * start;0;}), ({ * start = bv_offset;get_page( * pages = bv_page);返回bv_len;}), ({返回 - EFAULT;}))
1347  返回:0
调用者
名称描述
dio_refill_pagesGo grab and pin some userspace pages. Typically we'll get 64 at a time.
__bio_iov_iter_get_pages__bio_iov_iter_get_pages - pin user or kernel pages and add them to a bio*@bio: bio to add pages to*@iter: iov iterator describing the region to be mapped* Pins pages from *iter and appends them to @bio's bvec array. The
iter_to_pipe