On Mon, May 6, 2019 at 8:31 AM Jakub Wilk <jwilk@xxxxxxxxx> wrote: > > * Shawn Landden <shawn@xxxxxxx>, 2019-05-06, 08:06: > >--- a/man2/write.2 > >+++ b/man2/write.2 > >@@ -190,10 +190,18 @@ flag, and either the address specified in > > .IR buf , > > the value specified in > > .IR count , > > or the file offset is not suitably aligned. > > .TP > >+.B EINVAL > >+.\" MAX_RW_COUNT in include/linux/fs.h > >+The write amount is greater than > >+.B MAX_RW_COUNT, > >+which is > >+.B INT_MAX > >+rounded down to the page size (INT_MAX & ~PAGE_MASK). > >+.TP > > I can't reproduce this. For me, write() behaves as it is documented in > another part of this man page: > > "On Linux, write() (and similar system calls) will transfer at most > 0x7ffff000 (2,147,479,552) bytes, returning the number of bytes actually > transferred. (This is true on both 32-bit and 64-bit systems.)" Ahh, it was changed in 2016 commit bc61384dcdd82a6faabafecdcd80040625db5e40 > > I've attached the program that I used for testing. > > -- > Jakub Wilk