page_cache_readahead(9)
NAME
page_cache_readahead - generic adaptive readahead
SYNOPSIS
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 per
- forming in PAGE_CACHE_SIZE units
DESCRIPTION
- page_cache_readahead is the main function. If performs the
- adaptive readahead window size management and submits the reada
- head 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.