summaryrefslogtreecommitdiff
path: root/man2/posix_fadvise.2
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2005-04-11 15:04:27 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2005-04-11 15:04:27 +0000
commitf21a10c814f9548c84bf7e88404e5979d1b1f0c2 (patch)
treeeca7453ce8fb80b6f67a8df5c1b8dad158bca8c5 /man2/posix_fadvise.2
parent2b44301c2ad3374a07bc271696f310a413b13e99 (diff)
Noted kernel version where posix_fadvise() appeared and
noted bug in handling of 'len' in kernels < 2.6.6.
Diffstat (limited to 'man2/posix_fadvise.2')
-rw-r--r--man2/posix_fadvise.211
1 files changed, 11 insertions, 0 deletions
diff --git a/man2/posix_fadvise.2 b/man2/posix_fadvise.2
index 814e3b21f..59a3d1495 100644
--- a/man2/posix_fadvise.2
+++ b/man2/posix_fadvise.2
@@ -21,6 +21,8 @@
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
+.\" 2005-04-08 mtk, noted kernel version and added BUGS
+.\"
.TH POSIX_FADVISE 2 "14 Feb 2003" "Linux 2.5.60" "Linux Programmer's Manual"
.SH NAME
posix_fadvise \- predeclare an access pattern for file data
@@ -78,6 +80,10 @@ An invalid value was specified for \fIadvice\fP.
The specified file descriptor refers to a pipe or FIFO. (Linux actually
returns EINVAL in this case.)
.SH NOTES
+.BR posix_fadvise
+appeared in kernel 2.5.60.
+.\" Actually as fadvise64() -- MTK
+
Under Linux, \fBPOSIX_FADV_NORMAL\fP sets the readahead window to the
default size for the backing device; \fBPOSIX_FADV_SEQUENTIAL\fP doubles
this size, and \fBPOSIX_FADV_RANDOM\fP disables file readahead entirely.
@@ -103,5 +109,10 @@ SUSv3 (Advanced Realtime Option), POSIX 1003.1-2003.
Note that the type of the
.I len
parameter was changed from size_t to off_t in POSIX 1003.1-2003 TC5.
+.SH BUGS
+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".
.SH "SEE ALSO"
.BR posix_fallocate "(2), " posix_madvise "(2)."