Does FreeBSD have replacement for posix_fadvice() or
fcntl(F_RDADVISE)?
mdf at FreeBSD.org
mdf at FreeBSD.org
Thu May 12 11:40:27 UTC 2011
On Thu, May 12, 2011 at 4:17 AM, Kostik Belousov <kostikbel at gmail.com> wrote:
> On Thu, May 12, 2011 at 11:38:12AM +0400, Lev Serebryakov wrote:
>> Hello, Freebsd-hackers.
>>
>> 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.
> No, it does not (and I think the function is spelled posix_fadvise()).
>
> mdf reserved the syscall slot for posix_fadvise in his recent work
> on posix_fallocate(). Might be, he could comment more.
Whoops, I replied bot forgot to reply-all.
Adding a stub for posix_fadvise() is on my list of things to do, since
we use it at $WORK in our custom filesystem, but the list is long and
spare time is short.
Nominally a technically correct implementation can do error checking
and then nothing. Even after a stub is added to the OS, each
filesystem must implement a VOP to do the work.
Cheers,
matthew
More information about the freebsd-hackers
mailing list