Subject: | suggest no file length check |
Date: | Thu, 24 Jan 2019 11:59:41 +1100 |
To: | bug-Sys-PageCache [...] rt.cpan.org |
From: | Kevin Ryde <user42_kevin [...] yahoo.com.au> |
I see fadvise() checks the length of the file and warns if the advised
region exceeds the length. As a suggestion, I think that could be
omitted.
I think the system call allows regions beyond the end of a file and
quietly ignores the excess. If a file size is changing, or if you're
just advising about say the next 10 kbytes from current file position
which you're going to read, then it'd be convenient not to worry about
possibly being past the end.