.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
-.\"
+.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
-.\"
+.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
The \fIadvice\fP applies to a (not necessarily existent) region starting
at \fIoffset\fP and extending for \fIlen\fP bytes (or until the end of
-the file if \fIlen\fP is 0) within the file referred to by \fIfd\fP. The
-advice is not binding; it merely constitutes an expectation on behalf of
+the file if \fIlen\fP is 0) within the file referred to by \fIfd\fP.
+The advice is not binding; it merely constitutes an expectation on behalf of
the application.
Permissible values for \fIadvice\fP include:
.TP
.B POSIX_FADV_NORMAL
Indicates that the application has no advice to give about its access
-pattern for the specified data. If no advice is given for an open file,
+pattern for the specified data.
+If no advice is given for an open file,
this is the default assumption.
.TP
.B POSIX_FADV_SEQUENTIAL
.B POSIX_FADV_DONTNEED
The specified data will not be accessed in the near future.
.SH "RETURN VALUE"
-On success, zero is returned.
+On success, zero is returned.
On error, an error number is returned.
.SH ERRORS
.TP
(but other open file handles to the same file are unaffected).
\fBPOSIX_FADV_WILLNEED\fP initiates a
-non-blocking read of the specified region into the page cache.
-The amount of data read may be decreased by the kernel depending
-on virtual memory load.
-(A few megabytes will usually be fully satisfied,
+non-blocking read of the specified region into the page cache.
+The amount of data read may be decreased by the kernel depending
+on virtual memory load.
+(A few megabytes will usually be fully satisfied,
and more is rarely useful.)
-In kernels before 2.6.18, \fBPOSIX_FADV_NOREUSE\fP had the
+In kernels before 2.6.18, \fBPOSIX_FADV_NOREUSE\fP had the
same semantics as \fBPOSIX_FADV_WILLNEED\fP.
This was probably a bug; since kernel 2.6.18, this flag is a no-op.
\fBPOSIX_FADV_DONTNEED\fP attempts to free cached pages associated with
-the specified region. This is useful, for example, while streaming large
-files. A program may periodically request the kernel to free cached data
+the specified region.
+This is useful, for example, while streaming large
+files.
+A program may periodically request the kernel to free cached data
that has already been used, so that more useful cached pages are not
discarded instead.
POSIX.1-2001.
Note that the type of the
.I len
-parameter was changed from
-.I size_t
-to
-.I off_t
+parameter was changed from
+.I size_t
+to
+.I off_t
in POSIX.1-2003 TC1.
.SH BUGS
-In kernels before 2.6.6, if
+In kernels before 2.6.6, if
.I len
was specified as 0, then this was interpreted literally as "zero bytes",
rather than as meaning "all bytes through to the end of the file".