函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:io_write

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

返回类型:int

参数:

类型参数名称
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  如果ret小于0则返回:ret
1926  如果非force_nonblockki_flags与等于IOCB_NOWAIT的反
1929  result等于0
1930  io_size等于ret
1931  如果flags按位与linked sqes result等于io_size
1938  如果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.
1939  flags或等于must be punted even for NONBLOCK
1940  转到:copy_iov
1944  如果force_nonblock且非ki_flags按位与IOCB_DIRECT的值且flags按位与gular file 则转到:copy_iov
1948  iov_count等于iov_iter_count( & iter)
1949  ret等于rw_verify_area(WRITE, file, & 文件偏移, iov_count)
1950  如果非ret
1960  如果flags按位与gular file
1966  ki_flags或等于IOCB_WRITE
1968  如果write_iterret2等于call_write_iter(file, kiocb, & iter)
1970  否则ret2等于For files that don't have ->read_iter() and ->write_iter(), handle them* by looping over ->read() or ->write() manually.
1976  如果ret2恒等于负EOPNOTSUPPki_flags按位与IOCB_NOWAITret2等于负EAGAIN
1978  如果非force_nonblockret2不等于负EAGAIN
1980  否则
1981  copy_iov :
1984  如果ret则转到:out_free
1986  返回:负EAGAIN
1989  out_free :
1990  释放内存
1991  返回:ret
调用者
名称描述
io_issue_sqe