Another function from a recent POSIX standard which requires a kernel
int posix_fadvise (int fd, off_t offset, size_t len, int advise)
This function works very similar to madvise (which has the name
posix_madvise in the standard) except that it works on a file and not
a mmap()ed region.
The standard defines the advises
#define POSIX_FADV_NORMAL 0 /* No further special treatment. */
#define POSIX_FADV_RANDOM 1 /* Expect random page references. */
#define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
#define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
#define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
#define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
(I've reused the numbers already used for the MADV_* values and added
POSIX_FADV_NOREUSE at the end.)
With madvise already in place it should not be too hard to implement
I can provide more information to somebody who wants to give it a shot.
As far posix_fallocate, this function should implemented in the kernel
with a 64-bit offset (like pread/pwrite).
-- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to firstname.lastname@example.org Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:23 EST