readahead() which is Linux-only vs. posix_fadvise()

Jeremy Allison jra at samba.org
Thu May 10 22:04:25 GMT 2007


On Thu, May 10, 2007 at 11:28:26PM +0200, Henrik Nordstrom wrote:
> ons 2007-05-09 klockan 21:35 -0400 skrev derrell at samba.org:
> 
> > In researching this, I discovered what appears to be a POSIX replacement.  It
> > looks like readahead is equivalent to posix_fadvise(..., POSIX_FADV_WILLNEED).
> 
> Not entirely equivalent. readahead() blocks, while POSIX_FADV_WILLNEED
> doesn't..

That's what I meant. I actually want the block in the vfs module,
but have to make do with the nonblocking if readahead isn't available.

Jeremy.


More information about the samba-technical mailing list