Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\filemap.c Create Date:2022-07-28 14:02:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:ssize_t generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)

Type:ssize_t

Parameter:

TypeParameterName
struct kiocb *iocb
struct iov_iter *iter
2276  count = iov_iter_count(iter)
2277  retval = 0
2279  If Not count Then Go to out
2282  If ki_flags & IOCB_DIRECT Then
2283  file = ki_filp
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  If ki_flags & IOCB_NOWAIT Then
2293  Else
2297  If retval < 0 Then Go to out
2301  file_accessed(file)
2303  retval = direct_IO(iocb, iter)
2304  If retval >= 0 Then
2306  count -= retval
2308  iov_iter_revert(iter, count - iov_iter_count(iter))
2319  If retval < 0 || Not count || The 'ki_filp' pointer is shared in a union for aio >= size || IS_DAX(inode) Then Go to 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  Return retval
Caller
NameDescribe
blkdev_read_iter