函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:iov_iter_get_pages_alloc

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

返回类型:ssize_t

参数:

类型参数名称
struct iov_iter *i
struct page ***pages
size_tmaxsize
size_t *start
1395  如果maxsize大于countmaxsize等于count
1398  如果此条件成立可能性小(为编译器优化)(iov_iter_is_pipe(i))则返回:pipe_get_pages_alloc(i, pages, maxsize, start)
1400  如果此条件成立可能性小(为编译器优化)(iov_iter_is_discard(i))则返回:负EFAULT
1403  iterate_all_kinds(i, maxsize, v, ({unsignedlongaddr = (unsignedlong)iov_base;size_tlen = iov_len + ( * start = addr & (PAGE_SIZE - 1));intn;intres;addr &= ~(PAGE_SIZE - 1);n = DIV_ROUND_UP(len, PAGE_SIZE);p = get_pages_array(n);如果非p则返回 - ENOMEM;res = get_user_pages_fast(addr, n, iov_iter_rw(i) != WRITE ? check pte is writable : 0, p);如果此条件成立可能性小(为编译器优化)(res < 0)则{kvfree() - Free memory.*@addr: Pointer to allocated memory.* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().* It is slightly more efficient to use kfree() or vfree() if you are certain* that you know which one to use.;返回res;} * pages = p;返回:如果res恒等于nlen否则resPAGE_SIZE - * start;0;}), ({ * start = bv_offset; * pages = p = get_pages_array(1);如果非p则返回 - ENOMEM;get_page( * p = bv_page);返回bv_len;}), ({返回 - EFAULT;}))
1434  返回:0
调用者
名称描述
bio_map_user_iov_map_user_iov - map user iovec into bio*@q: the struct request_queue for the bio*@iter: iovec iterator*@gfp_mask: memory allocation flags* Map the user space address into a bio suitable for io to a block* device. Returns an error pointer in case of error.
default_file_splice_read