Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blkdev_read_iter

Proto:ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to)

Type:ssize_t

Parameter:

TypeParameterName
struct kiocb *iocb
struct iov_iter *to
2029  file = ki_filp
2030  bd_inode = bdev_file_inode(file)
2031  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
2032  pos = The 'ki_filp' pointer is shared in a union for aio
2034  If pos >= size Then Return 0
2037  size -= pos
2038  Cap the iov_iter by given limit; note that the second argument is* *not* the new size - it's upper limit for such. Passing it a value* greater than the amount of data in iov_iter is fine - it'll just do* nothing in that case.
2039  Return 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