diff mbox series

[1/2] readv.2: Document RWF_NOAPPEND flag

Message ID 20241126090847.297371-2-john.g.garry@oracle.com (mailing list archive)
State New
Headers show
Series man2: Document RWF_NOAPPEND | expand

Commit Message

John Garry Nov. 26, 2024, 9:08 a.m. UTC
Document flag introduced in Linux v6.9

Signed-off-by: John Garry <john.g.garry@oracle.com>
---
 man/man2/readv.2 | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Alejandro Colomar Nov. 26, 2024, 11:52 a.m. UTC | #1
Hi John,

On Tue, Nov 26, 2024 at 09:08:46AM +0000, John Garry wrote:
> Document flag introduced in Linux v6.9
> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>
> ---
>  man/man2/readv.2 | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/man/man2/readv.2 b/man/man2/readv.2
> index 78232c19f..836612bbe 100644
> --- a/man/man2/readv.2
> +++ b/man/man2/readv.2
> @@ -238,6 +238,26 @@ However, if the
>  .I offset
>  argument is \-1, the current file offset is updated.
>  .TP
> +.BR RWF_NOAPPEND " (since Linux 6.9)"
> +The
> +.BR pwritev2 ()
> +system call does not honor the

The other surrounding paragraphs talk in imperative (e.g., "Do not
wait").  This should be consistent with them.  How about this?:

	Do not honor the O_APPEND open(2) flag.  This flag is meaningful
	only for pwritev2().  ...

Thanks for the patch!

Have a lovely day!
Alex

> +.B O_APPEND
> +.BR open (2)
> +flag.
> +Historically Linux honored
> +.B O_APPEND
> +flag if set and ignored the offset argument, which is a bug.
> +For
> +.BR pwritev2 (),
> +the
> +.I offset
> +argument is honored as expected if
> +.BR RWF_NOAPPEND
> +flag is set, the same as if
> +.B O_APPEND
> +flag were not set.
> +.TP
>  .BR RWF_ATOMIC " (since Linux 6.11)"
>  Requires that
>  writes to regular files in block-based filesystems
> -- 
> 2.31.1
>
John Garry Nov. 26, 2024, 11:57 a.m. UTC | #2
On 26/11/2024 11:52, Alejandro Colomar wrote:
> Hi John,
> 
> On Tue, Nov 26, 2024 at 09:08:46AM +0000, John Garry wrote:
>> Document flag introduced in Linux v6.9
>>
>> Signed-off-by: John Garry<john.g.garry@oracle.com>
>> ---
>>   man/man2/readv.2 | 20 ++++++++++++++++++++
>>   1 file changed, 20 insertions(+)
>>
>> diff --git a/man/man2/readv.2 b/man/man2/readv.2
>> index 78232c19f..836612bbe 100644
>> --- a/man/man2/readv.2
>> +++ b/man/man2/readv.2
>> @@ -238,6 +238,26 @@ However, if the
>>   .I offset
>>   argument is \-1, the current file offset is updated.
>>   .TP
>> +.BR RWF_NOAPPEND " (since Linux 6.9)"
>> +The
>> +.BR pwritev2 ()
>> +system call does not honor the
> The other surrounding paragraphs talk in imperative (e.g., "Do not
> wait").  This should be consistent with them.  How about this?:
> 
> 	Do not honor the O_APPEND open(2) flag.  This flag is meaningful
> 	only for pwritev2().  ...
> 

That sounds fine.

> Thanks for the patch!

No worries. Let's wait a bit to see if any comments from fsdevel people.

Thanks,
John
diff mbox series

Patch

diff --git a/man/man2/readv.2 b/man/man2/readv.2
index 78232c19f..836612bbe 100644
--- a/man/man2/readv.2
+++ b/man/man2/readv.2
@@ -238,6 +238,26 @@  However, if the
 .I offset
 argument is \-1, the current file offset is updated.
 .TP
+.BR RWF_NOAPPEND " (since Linux 6.9)"
+The
+.BR pwritev2 ()
+system call does not honor the
+.B O_APPEND
+.BR open (2)
+flag.
+Historically Linux honored
+.B O_APPEND
+flag if set and ignored the offset argument, which is a bug.
+For
+.BR pwritev2 (),
+the
+.I offset
+argument is honored as expected if
+.BR RWF_NOAPPEND
+flag is set, the same as if
+.B O_APPEND
+flag were not set.
+.TP
 .BR RWF_ATOMIC " (since Linux 6.11)"
 Requires that
 writes to regular files in block-based filesystems