函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:iov_iter_npages

函数原型:int iov_iter_npages(const struct iov_iter *i, int maxpages)

返回类型:int

参数:

类型参数名称
const struct iov_iter *i
intmaxpages
1587  size等于count
1588  npages等于0
1590  如果非size则返回:0
1592  如果此条件成立可能性小(为编译器优化)(iov_iter_is_discard(i))则返回:0
1595  如果此条件成立可能性小(为编译器优化)(iov_iter_is_pipe(i))则
1596  pipe等于pipe
1600  如果非sanity(i)则返回:0
1603  data_start(i, & iter_head, & off)
1605  npages等于pipe_space_for_user - Return number of slots available to userspace*@head: The pipe ring head pointer*@tail: The pipe ring tail pointer*@pipe: The pipe info structure
1606  如果npages大于等于maxpages则返回:maxpages
1608  否则iterate_all_kinds(i, size, v, ({unsignedlongp = (unsignedlong)iov_base;npages += DIV_ROUND_UP(p + iov_len, PAGE_SIZE) - p / PAGE_SIZE;如果npages大于等于maxpages则返回maxpages;0;}), ({npages++;如果npages大于等于maxpages则返回maxpages;}), ({unsignedlongp = (unsignedlong)iov_base;npages += DIV_ROUND_UP(p + iov_len, PAGE_SIZE) - p / PAGE_SIZE;如果npages大于等于maxpages则返回maxpages;}))
1626  返回:npages
调用者
名称描述
blkdev_direct_IO
do_blockdev_direct_IOThis is a library function for use by filesystem drivers
iomap_dio_bio_actor
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.
__blkdev_direct_IO