Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:io_read

Proto:static int io_read(struct io_kiocb *req, struct io_kiocb **nxt, bool force_nonblock)

Type:int

Parameter:

TypeParameterName
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  If ret < 0 Then Return ret
1839  If Not force_nonblock Then ki_flags &= ~IOCB_NOWAIT
1842  result = 0
1843  io_size = ret
1844  If flags & linked sqes Then result = io_size
1851  If force_nonblock && Not 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. Then
1852  flags |= must be punted even for NONBLOCK
1853  Go to copy_iov
1856  iov_count = iov_iter_count( & iter)
1857  ret = rw_verify_area(generic data direction definitions , file, & The 'ki_filp' pointer is shared in a union for aio , iov_count)
1858  If Not ret Then
1861  If read_iter Then ret2 = call_read_iter(file, kiocb, & iter)
1863  Else ret2 = For files that don't have ->read_iter() and ->write_iter(), handle them* by looping over ->read() or ->write() manually.
1867  If Not force_nonblock || ret2 != -EAGAIN Then
1869  Else
1870  copy_iov :
1873  If ret Then Go to out_free
1875  Return -EAGAIN
1878  out_free :
1879  kfree(iovec)
1880  Return ret
Caller
NameDescribe
io_issue_sqe