[RFC] 4950302: (fs spec) Random write produces different results on Linux vs Windows from same .class

Brian Burkhalter brian.burkhalter at oracle.com
Thu Nov 21 18:39:21 UTC 2019


> On Nov 19, 2019, at 4:52 PM, David Lloyd <david.lloyd at redhat.com> wrote:
> 
> What if, on Linux (newer kernels only unfortunately), instead of using
> O_APPEND at open, instead use pwritev2() and pass RWF_APPEND when
> writing if the channel was opened for append?  This would eliminate
> the extra system calls.  If you pass a -1 as the offset to that call
> with that flag set, then the file's offset is updated.

With respect to pwritev2(), the RWF_APPEND flag curiously does not appear in Ubuntu 18.04.3 LTS despite this being on a Linux 5 kernel:

$ uname -s -r -v
Linux 5.0.0-36-generic #39~18.04.1-Ubuntu SMP Tue Nov 12 11:09:50 UTC 2019

According to [1] RWF_APPEND is supposed to be since Linux 4.16. Am I missing something?

Thanks,

Brian

[1] https://manpages.debian.org/testing/manpages-dev/preadv2.2.en.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20191121/904b851b/attachment.html>


More information about the nio-dev mailing list