函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:io_read

函数原型:static int io_read(struct io_kiocb *req, struct io_kiocb **nxt, bool force_nonblock)

返回类型:int

参数:

类型参数名称
struct io_kiocb *req
struct io_kiocb **nxt
boolforce_nonblock
1828  iovec等于inline_vecs
1829  kiocb等于 NOTE: kiocb has the file as the first member, so don't do it here
1834  ret等于io_import_iovec(generic data direction definitions , req, & iovec, & iter)
1835  如果ret小于0则返回:ret
1839  如果非force_nonblockki_flags与等于IOCB_NOWAIT的反
1842  result等于0
1843  io_size等于ret
1844  如果flags按位与linked sqes result等于io_size
1851  如果force_nonblock且非If we tracked the file through the SCM inflight mechanism, we could support* any file. For now, just ensure that anything potentially problematic is done* inline.
1852  flags或等于must be punted even for NONBLOCK
1853  转到:copy_iov
1856  iov_count等于iov_iter_count( & iter)
1857  ret等于rw_verify_area(generic data direction definitions , file, & 文件偏移, iov_count)
1858  如果非ret
1861  如果read_iterret2等于call_read_iter(file, kiocb, & iter)
1863  否则ret2等于For files that don't have ->read_iter() and ->write_iter(), handle them* by looping over ->read() or ->write() manually.
1867  如果非force_nonblockret2不等于负EAGAIN
1869  否则
1870  copy_iov :
1873  如果ret则转到:out_free
1875  返回:负EAGAIN
1878  out_free :
1879  释放内存
1880  返回:ret
调用者
名称描述
io_issue_sqe