io_submit(2) System Calls Manual io_submit(2) io_submit - - C (libc, -lc) #include #include /* Definition of SYS_* constants */ #include int syscall(SYS_io_submit, aio_context_t ctx_id, long n, struct iocb *iocbpp[n]); Note: you probably want to use the io_setup(3) wrapper function provided by libaio; see VERSIONS. The io_submit() system call queues n I/O request blocks for processing in the AIO context ctx_id. The iocbpp argument should be an array of n AIO control blocks, which will be submitted to context ctx_id. iocb ( -), linux/aio_abi.h, , -. #include struct iocb { __u64 aio_data; __u32 PADDED(aio_key, aio_rw_flags); __u16 aio_lio_opcode; __s16 aio_reqprio; __u32 aio_fildes; __u64 aio_buf; __u64 aio_nbytes; __s64 aio_offset; __u64 aio_reserved2; __u32 aio_flags; __u32 aio_resfd; }; : aio_data data io_event - ( io_getevents(2)). aio_key , . io_submit(). aio_rw_flags -, . : RWF_APPEND ( Linux 4.16) . pwritev2(2), O_APPEND open(2). aio_offset . . RWF_DSYNC ( Linux 4.13) -. pwritev2(2), O_DSYNC open(2). RWF_HIPRI ( Linux 4.13) ; , RWF_NOWAIT ( Linux 4.14) , - , , , . - , -EAGAIN res io_event ( io_getevents(2)). RWF_SYNC ( Linux 4.13) -. pwritev2(2), O_SYNC open(2). RWF_NOAPPEND ( Linux 6.9) Do not honor O_APPEND open(2) flag. See the description of RWF_NOAPPEND in pwritev2(2). RWF_ATOMIC ( Linux 6.11) Write a block of data such that a write will never be torn from power fail or similar. See the description of RWF_ATOMIC in pwritev2(2). For usage with IOCB_CMD_PWRITEV, the upper vector limit is stx_atomic_write_segments_max. See STATX_WRITE_ATOMIC and stx_atomic_write_segments_max description in statx(2). aio_lio_opcode -, iocb. , linux/aio_abi.h: enum { IOCB_CMD_PREAD = 0, IOCB_CMD_PWRITE = 1, IOCB_CMD_FSYNC = 2, IOCB_CMD_FDSYNC = 3, IOCB_CMD_POLL = 5, IOCB_CMD_NOOP = 6, IOCB_CMD_PREADV = 7, IOCB_CMD_PWRITEV = 8, }; aio_reqprio . aio_fildes , -. aio_buf , . aio_nbytes , aio_buf. aio_offset , -. aio_flags , iocb. : IOCB_FLAG_RESFD - aio_resfd . IOCB_FLAG_IOPRIO ( Linux 4.18) aio_reqprio IOPRIO_VALUE, linux/ioprio.h. aio_resfd -. On success, io_submit() returns the number of iocbs submitted (which may be less than n, or 0 if n is zero). -1, errno . EAGAIN iocb. EBADF , iocb. EFAULT . EINVAL AIO, ctx_id. EINVAL n is less than 0. EINVAL The iocb at *iocbpp[0] is not properly initialized. EINVAL The operation specified is invalid for the file descriptor in the iocb. EINVAL The value in the aio_reqprio field is invalid. ENOSYS io_submit() . EPERM aio_reqprio IOPRIO_CLASS_RT, CAP_SYS_ADMIN. libaio provides a wrapper function with the same name, but different prototype and return value. You probably want to use that wrapper. Linux. Linux 2.5. io_cancel(2), io_destroy(2), io_getevents(2), io_setup(2), io_submit(3), aio(7) () Azamat Hackimov , Dmitriy S. Seregin , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () . Linux man-pages 6.18 11 2026 . io_submit(2)