diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2017-11-20 12:49:06 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2017-11-20 13:55:34 +0100 |
| commit | 2be12b9eaa4baba87d9829973b5a265854903403 (patch) | |
| tree | de56cf0faa4594821a8cea8b483581e4490fb0c7 | |
| parent | bfddbad031c875e885731ad536f2e301e84be776 (diff) | |
| download | man-pages-2be12b9eaa4baba87d9829973b5a265854903403.tar.gz | |
io_submit.2: Minor fixes to Goldwyn Rodrigues's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man2/io_submit.2 | 91 |
1 files changed, 47 insertions, 44 deletions
diff --git a/man2/io_submit.2 b/man2/io_submit.2 index c1e90f8f79..88532fa10a 100644 --- a/man2/io_submit.2 +++ b/man2/io_submit.2 @@ -1,4 +1,5 @@ .\" Copyright (C) 2003 Free Software Foundation, Inc. +.\" and Copyright (C) 2017 Goldwyn Rodrigues <rgoldwyn@suse.de> .\" .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) .\" This file is distributed according to the GNU General Public License. @@ -28,48 +29,45 @@ The .I iocbpp argument should be an array of \fInr\fP AIO control blocks, which will be submitted to context \fIctx_id\fP. +.PP The .I iocb -(I/O control block) structure defined in linux/aio_abi.h +(I/O control block) structure defined in +.IR linux/aio_abi.h defines the parameters that control the I/O operation. .PP .in +4n -.nf - +.EX #include <linux/aio_abi.h> 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; + __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; }; - -.fi +.EE .in +.PP The fields of this structure are as follows: .TP .I aio_data This is a internal field used by the kernel. Do not modify this field after an -.B io_submit (2) +.BR io_submit (2) call. .TP .I aio_key This is a internal field used by the kernel. Do not modify this field after an -.B io_submit (2) +.BR io_submit (2) call. .TP .I aio_rw_flags @@ -77,51 +75,57 @@ This defines the R/W flags passed with structure. The valid values are: .RS .TP -.I RWF_HIPRI +.B RWF_HIPRI High priority request, poll if possible .TP -.I RWF_DSYNC +.B RWF_DSYNC Write operation complete according to requirement of synchronized I/O data integrity. Similar to a file passed .B O_DSYNC parameter to -.B open(2) +.BR open (2). .TP -.I RWF_SYNC +.B RWF_SYNC Write operation complete according to requirement of synchronized I/O file integrity. Similar to a file passed -.B .O_SYNC +.B O_SYNC parameter to -.B open(2) +.BR open (2). .TP -.I RWF_NOWAIT +.B RWF_NOWAIT Don't wait if the I/O will block for operations such as file block allocations, dirty page flush, mutex locks, or a congested block device inside the kernel. If any of these conditions are met, the control block is returned immediately with a return value of -.B -EAGAIN -in the res field of the io_event structure. +.B \-EAGAIN +in the +.I res +field of the +.I io_event +structure. .RE .TP .I aio_lio_opcode This defines the type of I/O to be performed by the iocb structure. The -valid values are defined by the enum defined in linux/aio_abi.h: +valid values are defined by the enum defined in +.IR linux/aio_abi.h : +.IP .in +4 -.nf +.EX enum { - IOCB_CMD_PREAD = 0, - IOCB_CMD_PWRITE = 1, - IOCB_CMD_FSYNC = 2, - IOCB_CMD_FDSYNC = 3, - IOCB_CMD_NOOP = 6, - IOCB_CMD_PREADV = 7, - IOCB_CMD_PWRITEV = 8, + IOCB_CMD_PREAD = 0, + IOCB_CMD_PWRITE = 1, + IOCB_CMD_FSYNC = 2, + IOCB_CMD_FDSYNC = 3, + IOCB_CMD_NOOP = 6, + IOCB_CMD_PREADV = 7, + IOCB_CMD_PWRITEV = 8, }; -.fi +.EE .in .TP .I aio_reqprio @@ -143,15 +147,14 @@ This is the file offset at which the I/O operation is to be performed. .I aio_flags This is the flag to be passed iocb structure. The only valid value is -.I IOCB_FLAG_RESFD -, which indicates that the asynchronous I/O control must signal the file +.BR IOCB_FLAG_RESFD , +which indicates that the asynchronous I/O control must signal the file descriptor mentioned in .I aio_resfd upon completion. .TP .I aio_resfd The file descriptor to signal in the event of asynchronous I/O completion. - .SH RETURN VALUE On success, .BR io_submit () |
