]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/posix_fadvise.2
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[thirdparty/man-pages.git] / man2 / posix_fadvise.2
index 9d7128cd7929adaec3ab7c770295c53e9806f844..cd9a00823b78bc9b16a40d5f351ef3c95c0c8566 100644 (file)
@@ -9,7 +9,7 @@
 .\" 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
@@ -17,7 +17,7 @@
 .\" 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.
 .\"
@@ -40,15 +40,16 @@ to perform appropriate optimisations.
 
 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
@@ -67,7 +68,7 @@ The specified data will be accessed in the near future.
 .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
@@ -92,19 +93,21 @@ These changes affect the entire file, not just the specified region
 (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.
 
@@ -115,13 +118,13 @@ call \fBfsync\fP() or \fBfdatasync\fP() first.
 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".