VOP_ADVISE(9) | Kernel Developer's Manual | VOP_ADVISE(9) |
VOP_ADVISE
— apply
advice about use of file data
#include
<sys/param.h>
#include <sys/vnode.h>
int
VOP_ADVISE
(struct
vnode *vp, off_t
start, off_t end,
int advice);
This call applies advice for a range of a file's data. It is used to implement the posix_fadvise system call.
Its arguments are:
OFF_MAX
indicates that the advice is to be applied
up to the end of the file.POSIX_FADV_WILLNEED
POSIX_FADV_DONTNEED
If the start and end offsets are both zero, then the operation should be applied to the entire file. Note that this call is advisory only and may perform the requested operation on a subset of the requested range (including not performing it at all) and still return success.
The file should be unlocked on entry.
Zero is returned if the call is successful, otherwise an appropriate error code is returned.
EINVAL
]September 26, 2015 | Debian |