Signup
Search Linux manpages For:  

readahead(2) -- Linux man page

 

NAME

readahead - Read in advance one or more pages of a file within a page cache  

SYNOPSIS

#include <unistd.h>

ssize_t sys_readahead (int fd, loff_t offset, size_t count);

 

DESCRIPTION

readahead reads count pages in the page cache. If a page is not in the page cache, it is added to the page cache.

fd is the file descriptor of the file being read. offset is the location within the file to start reading. A page in the page cache is identified by a file's inode and by the offset within the file. fd and offset are used to identify the page in the page cache.

The offset is incremented by one to read the next page until count pages are read. If count pages is larger than the size of the file, then only up to the size of the file is read.

 

RETURN VALUE

readahead returns 0 on success; otherwise, it returns the error listed in the "Errors" section. If the offset specified is greater than the size of the file, then nothing is read and 0 is returned.

 

ERRORS

EBADF
readahead was not able to get the file.

 

AUTHOR

Joy Latten.


 
LINUX MAN PAGES
Man1 -- User Commands (Intro)
Man2 -- System Calls (Intro)
Man3 -- Library Functions (Intro)
Man4 -- Special Files (Intro)
Man5 -- File Formats (Intro)
Man6 -- Games (Intro)
Man7 -- Miscellaneous (Intro)
Man8 -- Administration (Intro)
Mann -- TCL Functions (not available)


WEB HOSTING SHOWCASE




 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2012 Broadband Media, Inc. All rights reserved.