diff options
author | Filipe David Manana <[email protected]> | 2010-04-26 13:04:40 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-05-20 15:48:17 +0200 |
commit | 21a67b797e40df930b83bd407ffc165b3f4b91b2 (patch) | |
tree | 268a10e8d1d4cd00c30d3f5ded8f103d9699167a /lib/kernel/doc/src/file.xml | |
parent | 3f53a96a8bd0cd4a18f819b6857e6a764706ede5 (diff) | |
download | otp-21a67b797e40df930b83bd407ffc165b3f4b91b2.tar.gz otp-21a67b797e40df930b83bd407ffc165b3f4b91b2.tar.bz2 otp-21a67b797e40df930b83bd407ffc165b3f4b91b2.zip |
Add file:advise/4 - a wrapper to the POSIX syscall posix_fadvise
Useful for informing the Operating System about the access pattern
for a file's data, so that it can adapt the caching strategy to
maximize disk IO performance.
Diffstat (limited to 'lib/kernel/doc/src/file.xml')
-rw-r--r-- | lib/kernel/doc/src/file.xml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml index c94df62d1f..382262d1ee 100644 --- a/lib/kernel/doc/src/file.xml +++ b/lib/kernel/doc/src/file.xml @@ -62,6 +62,25 @@ time() = {{Year, Month, Day}, {Hour, Minute, Second}} </section> <funcs> <func> + <name>advise(IoDevice, Offset, Length, Advise) -> ok | {error, Reason}</name> + <fsummary>Predeclare an access pattern for file data</fsummary> + <type> + <v>IoDevice = io_device()</v> + <v>Offset = int()</v> + <v>Length = int()</v> + <v>Advise = posix_file_advise()</v> + <v>posix_file_advise() = normal | sequential | random | no_reuse + | will_need | dont_need</v> + <v>Reason = ext_posix()</v> + </type> + <desc> + <p><c>advise/4</c> can be used to announce an intention to access file + data in a specific pattern in the future, thus allowing the + operating system to perform appropriate optimizations.</p> + <p>On some platforms, this function might have no effect.</p> + </desc> + </func> + <func> <name>change_group(Filename, Gid) -> ok | {error, Reason}</name> <fsummary>Change group of a file</fsummary> <type> |