On Thu, May 12, 2011 at 11:38:12AM +0400, Lev Serebryakov wrote:
>    Does FreeBSD have some custom call, which can be used where Linux
>  programs uses posix_fadvice() and DARWIN ones fcntl(F_RDADVISE)?

>    It is like madvise(2) but for file descriptors.

An effect like POSIX_FADV_SEQUENTIAL can be obtained with the
F_READAHEAD or F_RDAHEAD fcntl(2) requests. The implementation is
divided between the generic VFS layer and various filesystems (cd9660,
ext2fs, msdosfs, nfs, xfs and ufs appear to use the information to some
degree).

Setting readahead to 0 with the fcntl requests has little effect: it
resets the state of the sequential access detection heuristic but does
not disable it.

The O_DIRECT open(2) flag has an effect similar to what
POSIX_FADV_NOREUSE should do, except that it changes semantics by adding
alignment restrictions.

-- 
Jilles Tjoelker
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to