Lines Matching refs:mapping
35 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping) in file_ra_state_init() argument
37 ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages; in file_ra_state_init()
49 static void read_cache_pages_invalidate_page(struct address_space *mapping, in read_cache_pages_invalidate_page() argument
55 page->mapping = mapping; in read_cache_pages_invalidate_page()
57 page->mapping = NULL; in read_cache_pages_invalidate_page()
66 static void read_cache_pages_invalidate_pages(struct address_space *mapping, in read_cache_pages_invalidate_pages() argument
74 read_cache_pages_invalidate_page(mapping, victim); in read_cache_pages_invalidate_pages()
90 int read_cache_pages(struct address_space *mapping, struct list_head *pages, in read_cache_pages() argument
99 if (add_to_page_cache_lru(page, mapping, page->index, in read_cache_pages()
100 readahead_gfp_mask(mapping))) { in read_cache_pages()
101 read_cache_pages_invalidate_page(mapping, page); in read_cache_pages()
108 read_cache_pages_invalidate_pages(mapping, pages); in read_cache_pages()
130 const struct address_space_operations *aops = rac->mapping->a_ops; in read_pages()
147 aops->readpages(rac->file, rac->mapping, pages, in read_pages()
187 struct address_space *mapping = ractl->mapping; in page_cache_ra_unbounded() local
190 gfp_t gfp_mask = readahead_gfp_mask(mapping); in page_cache_ra_unbounded()
209 struct page *page = xa_load(&mapping->i_pages, index + i); in page_cache_ra_unbounded()
229 if (mapping->a_ops->readpages) { in page_cache_ra_unbounded()
232 } else if (add_to_page_cache_lru(page, mapping, index + i, in page_cache_ra_unbounded()
262 struct inode *inode = ractl->mapping->host; in do_page_cache_ra()
287 struct address_space *mapping = ractl->mapping; in force_page_cache_ra() local
288 struct backing_dev_info *bdi = inode_to_bdi(mapping->host); in force_page_cache_ra()
291 if (unlikely(!mapping->a_ops->readpage && !mapping->a_ops->readpages && in force_page_cache_ra()
292 !mapping->a_ops->readahead)) in force_page_cache_ra()
396 static pgoff_t count_history_pages(struct address_space *mapping, in count_history_pages() argument
402 head = page_cache_prev_miss(mapping, index - 1, max); in count_history_pages()
411 static int try_context_readahead(struct address_space *mapping, in try_context_readahead() argument
419 size = count_history_pages(mapping, index, max); in try_context_readahead()
449 struct backing_dev_info *bdi = inode_to_bdi(ractl->mapping->host); in ondemand_readahead()
492 start = page_cache_next_miss(ractl->mapping, index + 1, in ondemand_readahead()
526 if (try_context_readahead(ractl->mapping, ra, index, req_size, in ondemand_readahead()
612 if (inode_read_congested(ractl->mapping->host)) in page_cache_async_ra()