函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\read_write.c Create Date:2022-07-29 10:31:31
Last Modify:2020-03-18 10:18:51 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:py_file_range() differs from regular file read and write in that it* specifically allows return partial success. When it does so is up to* the copy_file_range method.

函数原型:ssize_t vfs_copy_file_range(struct file *file_in, loff_t pos_in, struct file *file_out, loff_t pos_out, size_t len, unsigned int flags)

返回类型:ssize_t

参数:

类型参数名称
struct file *file_in
loff_tpos_in
struct file *file_out
loff_tpos_out
size_tlen
unsigned intflags
1631  如果flags不等于0则返回:负EINVAL
1634  ret等于Performs necessary checks before doing a file copy* Can adjust amount of bytes to copy via @req_count argument.* Returns appropriate error code that caller should return or* zero in case the copy should be allowed.
1636  如果此条件成立可能性小(为编译器优化)(ret)则返回:ret
1639  ret等于rw_verify_area(generic data direction definitions , file_in, & pos_in, len)
1640  如果此条件成立可能性小(为编译器优化)(ret)则返回:ret
1643  ret等于rw_verify_area(WRITE, file_out, & pos_out, len)
1644  如果此条件成立可能性小(为编译器优化)(ret)则返回:ret
1647  如果len恒等于0则返回:0
1650  file_start_write(file_out)
1656  如果remap_file_rangei_sb恒等于i_sb
1660  cloned等于remap_file_range(file_in, pos_in, file_out, pos_out, min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(loff_t, MAX_RW_COUNT, len), REMAP_FILE_CAN_SHORTEN)
1664  如果cloned大于0则
1665  ret等于cloned
1666  转到:done
1670  ret等于do_copy_file_range(file_in, pos_in, file_out, pos_out, len, flags)
1672  WARN_ON_ONCE(ret == - EOPNOTSUPP)
1673  done :
1674  如果ret大于0则
1675  snotify_access - file was read
1676  add_rchar(当前进程, ret)
1677  snotify_modify - file was modified
1678  add_wchar(当前进程, ret)
1681  inc_syscr(当前进程)
1682  inc_syscw(当前进程)
1684  file_end_write(file_out)
1686  返回:ret
调用者
名称描述
SYSCALL_DEFINE6