函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__io_submit_one

函数原型:static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb __user *user_iocb, struct aio_kiocb *req, bool compat)

返回类型:int

参数:

类型参数名称
struct kioctx *ctx
const struct iocb *iocb
struct iocb __user *user_iocb
struct aio_kiocb *req
boolcompat
1798  ki_filp等于fget(要被操作的fd)
1799  如果此条件成立可能性小(为编译器优化)(!ki_filp)则返回:负EBADF
1802  如果异步请求处理完成时使用eventfd进行通知按位与Valid flags for the "aio_flags" member of the "struct iocb".* IOCB_FLAG_RESFD - Set if the "aio_resfd" member of the "struct iocb"* is valid.* IOCB_FLAG_IOPRIO - Set if the "aio_reqprio" member of the "struct iocb"* is valid.
1810  eventfd等于ventfd_ctx_fdget - Acquires a reference to the internal eventfd context.*@fd: [in] Eventfd file descriptor.* Returns a pointer to the internal eventfd context, otherwise the error* pointers returned by the following functions:* eventfd_fget
1811  如果是错误则返回:错误
1814  If the aio_resfd field of the userspace iocb is not zero,* this is the underlying eventfd context to deliver events to.等于eventfd
1817  如果此条件成立可能性小(为编译器优化)(put_user - Write a simple value into user space(KIOCB_KEY, & he kernel sets aio_key to the req # ))则
1818  pr_debug("EFAULT: aio_key\n")
1819  返回:负EFAULT
1822  异步请求指针等于user_iocb
1823  可携带的私有数据等于请求可携带的私有数据
1824  IO请求的结果等于0
1825  secondary result 等于0
1828  :异步请求类型恒等于IOCB_CMD_PREAD
1829  返回:aio_read( & rw, iocb, TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., compat)
1830  :异步请求类型恒等于IOCB_CMD_PWRITE
1831  返回:aio_write( & rw, iocb, TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., compat)
1832  :异步请求类型恒等于IOCB_CMD_PREADV
1833  返回:aio_read( & rw, iocb, true, compat)
1834  :异步请求类型恒等于IOCB_CMD_PWRITEV
1835  返回:aio_write( & rw, iocb, true, compat)
1836  :异步请求类型恒等于IOCB_CMD_FSYNC
1837  返回:aio_fsync( & fsync, iocb, false)
1838  :异步请求类型恒等于IOCB_CMD_FDSYNC
1839  返回:aio_fsync( & fsync, iocb, true)
1840  :异步请求类型恒等于IOCB_CMD_POLL
1841  返回:aio_poll(req, iocb)
1842  默认
1843  pr_debug("invalid aio operation %d\n", 异步请求类型)
1844  返回:负EINVAL
调用者
名称描述
io_submit_one