函数逻辑报告

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_from_iter

函数原型:size_t copy_page_from_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
929  如果此条件成立可能性小(为编译器优化)(!page_copy_sane(page, offset, bytes))则返回:0
931  如果此条件成立可能性小(为编译器优化)(iov_iter_is_pipe(i) || iov_iter_is_discard(i))则
932  WARN_ON(1)
933  返回:0
935  如果* 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的值则
936  kaddr等于kmap_atomic(page)
937  wanted等于_copy_from_iter(kaddr + offset, bytes, i)
938  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)
939  返回:wanted
940  否则返回:copy_page_from_iter_iovec(page, offset, bytes, i)
调用者
名称描述
pipe_write
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,
bio_copy_from_iter_copy_from_iter - copy all pages from iov_iter to bio*@bio: The &struct bio which describes the I/O as destination*@iter: iov_iter as source* Copy all pages from iov_iter to bio.* Returns 0 on success, or error on failure.