函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\filemap.c Create Date:2022-07-27 15:25:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:generic_file_read_iter - generic filesystem read routine*@iocb: kernel I/O control block*@iter: destination for the data read* This is the "read_iter()" routine for all filesystems* that can use the page cache directly

函数原型:ssize_t generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)

返回类型:ssize_t

参数:

类型参数名称
struct kiocb *iocb
struct iov_iter *iter
2276  count等于iov_iter_count(iter)
2277  retval等于0
2279  如果非count则转到:out
2282  如果ki_flags按位与IOCB_DIRECT
2283  file等于文件指针
2284  mapping等于f_mapping
2285  inode等于host
2288  size等于NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they
2289  如果ki_flags按位与IOCB_NOWAIT
2293  否则
2297  如果retval小于0则转到:out
2301  file_accessed(file)
2303  retval等于direct_IO(iocb, iter)
2304  如果retval大于等于0则
2305  文件偏移加等于retval
2306  count减等于retval
2308  iov_iter_revert(iter, count - iov_iter_count(iter))
2319  如果retval小于0或非count文件偏移大于等于sizeIS_DAX(inode)则转到:out
2324  retval等于generic_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.
2325  out :
2326  返回:retval
调用者
名称描述
blkdev_read_iter