page_cache_readahead(9)

page_cache_readahead9

Generic adaptive readahead

Usage

unsigned long page_cache_readahead(struct address_space * mapping, struct file_ra_state * ra, struct file * filp, pgoff_t offset, unsigned long req_size);

Arguments

mapping

address_space which holds the pagecache and I/O vectors

ra

file_ra_state which holds the readahead state

filp

passed on to ->readpage and ->readpages

offset

start offset into mapping, in PAGE_CACHE_SIZE units

req_size

hint: total size of the read which the caller is performing in PAGE_CACHE_SIZE units

Overview

page_cache_readahead is the main function. If performs the adaptive readahead window size management and submits the readahead I/O.

Note that filp is purely used for passing on to the ->readpage[s]()

Handler

it may refer to a different file from mapping (so we may not use filp->f_mapping or filp->f_dentry->d_inode here). Also, ra may not be equal to &filp->f_ra.

From linux-manual-2.6.18 2.6.18.dfsg.1-26etch2 in Debian 4.0 (Etch). Parsed by carta from the page's man source.