read_cache_page — read into page cache, fill it if needed


struct page * read_cache_page (struct address_space * mapping,
 pgoff_t index,
 int (*filler) (void *, struct page *),
 void * data);


struct address_space * mapping

the page's address_space

pgoff_t index

the page index

int (*)(void *, struct page *) filler

function to perform the read

void * data

first arg to filler(data, page) function, often left as NULL


Read into the page cache. If a page already exists, and PageUptodate is not set, try to fill the page and wait for it to become unlocked.

If the page does not get brought uptodate, return -EIO.