函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blkdev_read_iter

函数原型:ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to)

返回类型:ssize_t

参数:

类型参数名称
struct kiocb *iocb
struct iov_iter *to
2029  file等于文件指针
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等于文件偏移
2034  如果pos大于等于size则返回: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  返回: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