Hi Jens, On Mon, Aug 11, 2025 at 11:25:52AM -0600, Jens Axboe wrote: > > Other than this comments, the text looks good to me. Thanks! > > I kind of walked away from this one as I didn't have time or motivation > to push it forward. FWIW, if you want to massage it into submission > that'd be greatly appreciated. I'm not a regular man page contributor > nor do I aim to be, but I do feel like we should this feature > documented. I understand your lack of interest in writing quality man(7) source code if that means iterations of patches. However, you may find the build system helpful to find some of the most obvious mistakes by yourself. This might help you in future patches. $ make lint-man build-all -R TROFF .tmp/man/man2/readv.2.cat.set an.tmac:.tmp/man/man2/readv.2:316: style: .IR expects at least 2 arguments, got 1 an.tmac:.tmp/man/man2/readv.2:395: style: .IR expects at least 2 arguments, got 1 make: *** [/srv/alx/src/linux/man-pages/man-pages/contrib/share/mk/build/catman/troff.mk:66: .tmp/man/man2/readv.2.cat.set] Error 1 make: *** Deleting file '.tmp/man/man2/readv.2.cat.set' Here's a diff with all the issues I raised fixed. Please add a commit message, and I'll apply it. Have a lovely day! Alex diff --git i/man/man2/readv.2 w/man/man2/readv.2 index c3b0a7091..5b2de3025 100644 --- i/man/man2/readv.2 +++ w/man/man2/readv.2 @@ -301,6 +301,39 @@ .SS preadv2() and pwritev2() .B RWF_SYNC is specified for .BR pwritev2 ()). +.TP +.BR RWF_DONTCACHE " (since Linux 6.14)" +Reads or writes to a regular file +will prune instantiated page cache content +when the operation completes. +This is different than normal buffered I/O, +where the data usually remains in cache +until such time that it gets reclaimed +due to memory pressure. +If ranges of the read or written I/O +were already in cache before this read or write, +then those ranges will not be pruned at I/O completion time. +.IP +Additionally, +any range dirtied by a write operation with +.B RWF_DONTCACHE +set will get kicked off for writeback. +This is similar to calling +.BR sync_file_range (2) +with +.I SYNC_FILE_RANGE_WRITE +to start writeback on the given range. +.B RWF_DONTCACHE +is a hint, or best effort, +where no hard guarantees are given on the state of the page cache +once the operation completes. +.IP +If used on a file system or block device +that doesn't support it, +it will return \-1, and +.I errno +will be set to +.BR EOPNOTSUPP . .SH RETURN VALUE On success, .BR readv (), @@ -368,6 +401,12 @@ .SH ERRORS .I statx. .TP .B EOPNOTSUPP +.B RWF_DONTCACHE +was set in +.I flags +and the file doesn't support it. +.TP +.B EOPNOTSUPP An unknown flag is specified in .IR flags . .SH VERSIONS > > -- > Jens Axboe > -- <https://www.alejandro-colomar.es/>
Attachment:
signature.asc
Description: PGP signature