]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/io_submit.2
move_pages.2: Minor tweaks to Yang Shi's patch
[thirdparty/man-pages.git] / man2 / io_submit.2
index d17e3122acc26e379b0f991365551ea64df96189..3ab73260f00d2f78ed01413a94d2a8a4ab779b02 100644 (file)
@@ -5,7 +5,7 @@
 .\" This file is distributed according to the GNU General Public License.
 .\" %%%LICENSE_END
 .\"
-.TH IO_SUBMIT 2 2018-04-30 "Linux" "Linux Programmer's Manual"
+.TH IO_SUBMIT 2 2020-04-11 "Linux" "Linux Programmer's Manual"
 .SH NAME
 io_submit \- submit asynchronous I/O blocks for processing
 .SH SYNOPSIS
@@ -59,15 +59,17 @@ struct iocb {
 The fields of this structure are as follows:
 .TP
 .I aio_data
-This is an internal field used by the kernel.
-Do not modify this field after an
-.BR io_submit (2)
-call.
+This data is copied into the
+.I data
+field of the
+.I io_event
+structure upon I/O completion (see
+.BR io_getevents (2)).
 .TP
 .I aio_key
 This is an internal field used by the kernel.
 Do not modify this field after an
-.BR io_submit (2)
+.BR io_submit ()
 call.
 .TP
 .I aio_rw_flags
@@ -89,7 +91,7 @@ The
 field is ignored.
 The file offset is not changed.
 .TP
-.BR RWF_DSYNC " (since Linux 4.7)"
+.BR RWF_DSYNC " (since Linux 4.13)"
 Write operation complete according to requirement of
 synchronized I/O data integrity.
 See the description of the flag of the same name in
@@ -99,7 +101,7 @@ as well the description of
 in
 .BR open (2).
 .TP
-.BR RWF_HIPRI " (since Linux 4.6)"
+.BR RWF_HIPRI " (since Linux 4.13)"
 High priority request, poll if possible
 .TP
 .BR RWF_NOWAIT " (since Linux 4.14)"
@@ -116,7 +118,7 @@ field of the
 structure (see
 .BR io_getevents (2)).
 .TP
-.BR RWF_SYNC " (since Linux 4.7)"
+.BR RWF_SYNC " (since Linux 4.13)"
 Write operation complete according to requirement of
 synchronized I/O file integrity.
 See the description of the flag of the same name in
@@ -128,7 +130,9 @@ in
 .RE
 .TP
 .I aio_lio_opcode
-This defines the type of I/O to be performed by the iocb structure.
+This defines the type of I/O to be performed by the
+.I iocb
+structure.
 The
 valid values are defined by the enum defined in
 .IR linux/aio_abi.h :
@@ -140,6 +144,7 @@ enum {
     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,
@@ -150,7 +155,7 @@ enum {
 .I aio_reqprio
 This defines the requests priority.
 .TP
-.I aio_filedes
+.I aio_fildes
 The file descriptor on which the I/O operation is to be performed.
 .TP
 .I aio_buf
@@ -164,14 +169,28 @@ This is the size of the buffer pointed to by
 This is the file offset at which the I/O operation is to be performed.
 .TP
 .I aio_flags
-This is the flag to be passed iocb structure.
-The only valid value is
-.BR IOCB_FLAG_RESFD ,
-which indicates that the asynchronous I/O control must signal the file
+This is the set of flags associated with the
+.I iocb
+structure.
+The valid values are:
+.RS
+.TP
+.BR IOCB_FLAG_RESFD
+Asynchronous I/O control must signal the file
 descriptor mentioned in
 .I aio_resfd
 upon completion.
 .TP
+.BR IOCB_FLAG_IOPRIO " (since Linux 4.18)"
+.\" commit d9a08a9e616beeccdbd0e7262b7225ffdfa49e92
+Interpret the
+.I aio_reqprio
+field as an
+.B IOPRIO_VALUE
+as defined by
+.IR linux/ioprio.h .
+.RE
+.TP
 .I aio_resfd
 The file descriptor to signal in the event of asynchronous I/O completion.
 .SH RETURN VALUE
@@ -196,13 +215,23 @@ The AIO context specified by \fIctx_id\fP is invalid.
 \fInr\fP is less than 0.
 The \fIiocb\fP at
 .I *iocbpp[0]
-is not properly initialized,
-or the operation specified is invalid for the file descriptor
-in the \fIiocb\fP.
+is not properly initialized, the operation specified is invalid for the file
+descriptor in the \fIiocb\fP, or the value in the
+.I aio_reqprio
+field is invalid.
 .TP
 .B ENOSYS
 .BR io_submit ()
 is not implemented on this architecture.
+.TP
+.B EPERM
+The
+.I aio_reqprio
+field is set with the class
+.BR IOPRIO_CLASS_RT ,
+but the submitting context does not have the
+.B CAP_SYS_ADMIN
+capability.
 .SH VERSIONS
 .PP
 The asynchronous I/O system calls first appeared in Linux 2.5.