readahead() which is Linux-only vs. posix_fadvise()
davec-b at rogers.com
Thu May 10 12:59:03 GMT 2007
And even that isn't extant on Solaris, so both calls are no-ops.
In general, you will find most filesystems try to do coalescence on
writes and readahed on reads, irrespective of vendor.
On solaris this is controlled by the -C option on newfs, and affected
by the -a (maxcontig) option to newfs/tunefs.
derrell at samba.org wrote:
> As I was working on a solution to the fact that my system provides the
> readahead() function but not a declaration for that function, I discovered
> that readahead() is documented as:
> CONFORMING TO
> The readahead() system call is Linux specific, and its use should be
> avoided in portable applications.
> Given this, it is possible that different Linux versions may conceivably use
> slightly different prototypes for readahead(), so providing a declaration in
> lib/replace is somewhat dangerous.
> In researching this, I discovered what appears to be a POSIX replacement. It
> looks like readahead is equivalent to posix_fadvise(..., POSIX_FADV_WILLNEED).
> The only place that readahead() is used, I think, is in vfs_readahead.c.
> It might make sense for the maintainer of this module to look into using
> posix_fadvise() instead of readahead().
David Collier-Brown, | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb at spamcop.net | -- Mark Twain
More information about the samba-technical