Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__io_submit_one

Proto:static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, struct iocb __user *user_iocb, struct aio_kiocb *req, bool compat)

Type:int

Parameter:

TypeParameterName
struct kioctx *ctx
const struct iocb *iocb
struct iocb __user *user_iocb
struct aio_kiocb *req
boolcompat
1798  ki_filp = fget(aio_fildes)
1799  If Value for the false possibility is greater at compile time(!ki_filp) Then Return -EBADF
1802  If lags for the "struct iocb" & Valid flags for the"aio_flags" member of the"struct iocb" Then
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  If IS_ERR(eventfd) Then Return PTR_ERR(eventfd)
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  If Value for the false possibility is greater at compile time(Write a simple value into user space(KIOCB_KEY, & he kernel sets aio_key to the req # )) Then
1818  pr_debug("EFAULT: aio_key\n")
1819  Return -EFAULT
1822  what iocb this event came from = user_iocb
1823  he data field from the iocb = data to be returned in event's data
1824  sult code for this event = 0
1825  secondary result = 0
1828  Case see IOCB_CMD_ above == IOCB_CMD_PREAD
1829  Return 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  Case see IOCB_CMD_ above == IOCB_CMD_PWRITE
1831  Return 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  Case see IOCB_CMD_ above == IOCB_CMD_PREADV
1833  Return aio_read( & rw, iocb, true, compat)
1834  Case see IOCB_CMD_ above == IOCB_CMD_PWRITEV
1835  Return aio_write( & rw, iocb, true, compat)
1836  Case see IOCB_CMD_ above == IOCB_CMD_FSYNC
1837  Return aio_fsync( & fsync, iocb, false)
1838  Case see IOCB_CMD_ above == IOCB_CMD_FDSYNC
1839  Return aio_fsync( & fsync, iocb, true)
1840  Case see IOCB_CMD_ above == IOCB_CMD_POLL
1841  Return aio_poll(req, iocb)
1842  Default
1843  pr_debug("invalid aio operation %d\n", see IOCB_CMD_ above )
1844  Return -EINVAL
Caller
NameDescribe
io_submit_one