Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:io_write

Proto:static int io_write(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
1915  iovec = inline_vecs
1916  kiocb = NOTE: kiocb has the file as the first member, so don't do it here
1921  ret = io_import_iovec(WRITE, req, & iovec, & iter)
1922  If ret < 0 Then Return ret
1926  If Not force_nonblock Then ki_flags &= ~IOCB_NOWAIT
1929  result = 0
1930  io_size = ret
1931  If flags & linked sqes Then result = io_size
1938  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
1939  flags |= must be punted even for NONBLOCK
1940  Go to copy_iov
1944  If force_nonblock && Not (ki_flags & IOCB_DIRECT) && flags & gular file Then Go to copy_iov
1948  iov_count = iov_iter_count( & iter)
1949  ret = rw_verify_area(WRITE, file, & The 'ki_filp' pointer is shared in a union for aio , iov_count)
1950  If Not ret Then
1960  If flags & gular file Then
1966  ki_flags |= IOCB_WRITE
1968  If write_iter Then ret2 = call_write_iter(file, kiocb, & iter)
1970  Else ret2 = For files that don't have ->read_iter() and ->write_iter(), handle them* by looping over ->read() or ->write() manually.
1976  If ret2 == -EOPNOTSUPP && ki_flags & IOCB_NOWAIT Then ret2 = -EAGAIN
1978  If Not force_nonblock || ret2 != -EAGAIN Then
1980  Else
1981  copy_iov :
1984  If ret Then Go to out_free
1986  Return -EAGAIN
1989  out_free :
1990  kfree(iovec)
1991  Return ret
Caller
NameDescribe
io_issue_sqe