readv.2, io_submit.2: Document RWF_APPEND added in Linux 4.16
PATCH 1/1 readv.2, io_submit.2: Document RWF_APPEND added in Linux 4.16
--- man2/io_submit.2 | 10 ++++++++++ man2/readv.2 | 10 ++++++++++ 2 files changed, 20 insertions(+)
man2/io_submit.2 +10 -0
@@ -111,6 +111,16 @@ field of the .I io_event structure (see .BR io_getevents (2)). +.TP +.BR RWF_APPEND " (since Linux 4.16)" +.\" commit e1fc742e14e01d84d9693c4aca4ab23da65811fb +Append data to the end of the file. +See the description of the flag of the same name in +.BR pwritev2 (2) +as well as the description of +.B O_APPEND +in +.BR open (2). .RE .TP .I aio_lio_opcode
man2/readv.2 +10 -0
@@ -248,6 +248,16 @@ to .BR EAGAIN . Currently, this flag is meaningful only for .BR preadv2 (). +.TP +.BR RWF_APPEND " (since Linux 4.16)" +.\" commit e1fc742e14e01d84d9693c4aca4ab23da65811fb +Provide a per-write equivalent of the +.B O_APPEND +.BR open (2) +flag. +This flag is meaningful only for +.BR pwritev2 (), +and its effect applies only to the data range written by the system call. .SH RETURN VALUE On success, .BR readv (),
Signature · 1 line
2.16.2
Hello Jürg
Thanks for the patch, but there are some details that are unexplained in the text and in the kernel commit message.
Does the use of these flags change the file offset? The text should make this point explicit.
Presumably, when using this flag for pwritev2(), the 'offset' argument of the call is ignored. Presumably, the same is true for the 'aio_offset' field of the 'iocb' structure when using io_submit(). This point should be also be made explicit in the patch.
Would you be willing to revise the patch to include the answers to these questions?
Cheers,
Michael
Quoted 49 lines · Jürg Billeter
Signed-off-by Jürg Billeter <[email protected]>--- man2/io_submit.2 | 10 ++++++++++ man2/readv.2 | 10 ++++++++++ 2 files changed, 20 insertions(+)man2/io_submit.2 +10
-0@@ -111,6 +111,16 @@ field of the .I io_event structure (see .BR io_getevents (2)). +.TP +.BR RWF_APPEND " (since Linux 4.16)" +.\" commit e1fc742e14e01d84d9693c4aca4ab23da65811fb +Append data to the end of the file. +See the description of the flag of the same name in +.BR pwritev2 (2) +as well as the description of +.B O_APPEND +in +.BR open (2). .RE .TP .I aio_lio_opcodeman2/readv.2 +10
-0@@ -248,6 +248,16 @@ to .BR EAGAIN . Currently, this flag is meaningful only for .BR preadv2 (). +.TP +.BR RWF_APPEND " (since Linux 4.16)" +.\" commit e1fc742e14e01d84d9693c4aca4ab23da65811fb +Provide a per-write equivalent of the +.B O_APPEND +.BR open (2) +flag. +This flag is meaningful only for +.BR pwritev2 (), +and its effect applies only to the data range written by the system call. .SH RETURN VALUE On success, .BR readv (),
Signature · 3 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/
PATCH v2 1/1 readv.2, io_submit.2: Document RWF_APPEND added in Linux 4.16
---
Changes since version 1:
- Explain offset handling
man2/io_submit.2 | 13 +++++++++++++ man2/readv.2 | 17 +++++++++++++++++ 2 files changed, 30 insertions(+)
man2/io_submit.2 +13 -0
@@ -111,6 +111,19 @@ field of the .I io_event structure (see .BR io_getevents (2)). +.TP +.BR RWF_APPEND " (since Linux 4.16)" +.\" commit e1fc742e14e01d84d9693c4aca4ab23da65811fb +Append data to the end of the file. +See the description of the flag of the same name in +.BR pwritev2 (2) +as well as the description of +.B O_APPEND +in +.BR open (2). +The +.I aio_offset +field is ignored. The file offset is not changed. .RE .TP .I aio_lio_opcode
man2/readv.2 +17 -0
@@ -248,6 +248,23 @@ to .BR EAGAIN . Currently, this flag is meaningful only for .BR preadv2 (). +.TP +.BR RWF_APPEND " (since Linux 4.16)" +.\" commit e1fc742e14e01d84d9693c4aca4ab23da65811fb +Provide a per-write equivalent of the +.B O_APPEND +.BR open (2) +flag. +This flag is meaningful only for +.BR pwritev2 (), +and its effect applies only to the data range written by the system call. +The +.I offset +argument does not affect the write operation, the data is always appended +to the end of the file. However, if the +.I offset +argument is \-1, the current file offset is updated. +This matches the behavior when the file is opened in append mode. .SH RETURN VALUE On success, .BR readv (),
Signature · 1 line
2.16.3
Quoted 1 line · Jürg Billeter
Signed-off-by Jürg Billeter <[email protected]>
Thanks, Jürg. Patch applied.
Cheers,
Michael
Quoted 61 lines
---
Changes since version 1:
- Explain offset handlingman2/io_submit.2 | 13 +++++++++++++ man2/readv.2 | 17 +++++++++++++++++ 2 files changed, 30 insertions(+)man2/io_submit.2 +13
-0@@ -111,6 +111,19 @@ field of the .I io_event structure (see .BR io_getevents (2)). +.TP +.BR RWF_APPEND " (since Linux 4.16)" +.\" commit e1fc742e14e01d84d9693c4aca4ab23da65811fb +Append data to the end of the file. +See the description of the flag of the same name in +.BR pwritev2 (2) +as well as the description of +.B O_APPEND +in +.BR open (2). +The +.I aio_offset +field is ignored. The file offset is not changed. .RE .TP .I aio_lio_opcodeman2/readv.2 +17
-0@@ -248,6 +248,23 @@ to .BR EAGAIN . Currently, this flag is meaningful only for .BR preadv2 (). +.TP +.BR RWF_APPEND " (since Linux 4.16)" +.\" commit e1fc742e14e01d84d9693c4aca4ab23da65811fb +Provide a per-write equivalent of the +.B O_APPEND +.BR open (2) +flag. +This flag is meaningful only for +.BR pwritev2 (), +and its effect applies only to the data range written by the system call. +The +.I offset +argument does not affect the write operation, the data is always appended +to the end of the file. However, if the +.I offset +argument is \-1, the current file offset is updated. +This matches the behavior when the file is opened in append mode. .SH RETURN VALUE On success, .BR readv (),
Signature · 3 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/