函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:copy_page_to_iter

函数原型:size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, struct iov_iter *i)

返回类型:size_t

参数:

类型参数名称
struct page *page
size_toffset
size_tbytes
struct iov_iter *i
910  如果此条件成立可能性小(为编译器优化)(!page_copy_sane(page, offset, bytes))则返回:0
912  如果* Bit 0 is the read/write bit, set if we're writing. * Bit 1 is the BVEC_FLAG_NO_REF bit, set if type is a bvec and * the caller isn't expecting to drop a page reference when done.按位与ITER_BVEC按位或ITER_KVEC的值则
913  kaddr等于kmap_atomic(page)
914  wanted等于copy_to_iter(kaddr + offset, bytes, i)
915  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(kaddr)
916  返回:wanted
917  否则如果此条件成立可能性小(为编译器优化)(iov_iter_is_discard(i))则返回:bytes
919  否则如果此条件成立可能性大(为编译器优化)(!iov_iter_is_pipe(i))则返回:copy_page_to_iter_iovec(page, offset, bytes, i)
921  否则返回:copy_page_to_iter_pipe(page, offset, bytes, i)
调用者
名称描述
process_vm_rw_pagesprocess_vm_rw_pages - read/write pages from task specified*@pages: array of pointers to pages we want to copy*@offset: offset in page to start copying from/to*@len: number of bytes to copy*@iter: where to copy to/from locally*@vm_write: 0 means copy from,
pipe_to_user
generic_file_buffered_readgeneric_file_buffered_read - generic file read routine*@iocb: the iocb to read*@iter: data destination*@written: already copied* This is a generic file read routine, and uses the* mapping->a_ops->readpage() function for the actual low-level stuff.
bio_copy_to_iter_copy_to_iter - copy all pages from bio to iov_iter*@bio: The &struct bio which describes the I/O as source*@iter: iov_iter as destination* Copy all pages from bio to iov_iter.* Returns 0 on success, or error on failure.
pipe_read