Lines Matching refs:mapping
34 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)
36 ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages;
48 static void read_cache_pages_invalidate_page(struct address_space *mapping,
54 page->mapping = mapping;
56 page->mapping = NULL;
65 static void read_cache_pages_invalidate_pages(struct address_space *mapping,
73 read_cache_pages_invalidate_page(mapping, victim);
79 * @mapping: the address_space
89 int read_cache_pages(struct address_space *mapping, struct list_head *pages,
98 if (add_to_page_cache_lru(page, mapping, page->index,
99 readahead_gfp_mask(mapping))) {
100 read_cache_pages_invalidate_page(mapping, page);
107 read_cache_pages_invalidate_pages(mapping, pages);
120 const struct address_space_operations *aops = rac->mapping->a_ops;
137 aops->readpages(rac->file, rac->mapping, pages,
177 struct address_space *mapping = ractl->mapping;
180 gfp_t gfp_mask = readahead_gfp_mask(mapping);
190 * filesystems already specify __GFP_NOFS in their mapping's
199 struct page *page = xa_load(&mapping->i_pages, index + i);
219 if (mapping->a_ops->readpages) {
222 } else if (add_to_page_cache_lru(page, mapping, index + i,
252 struct inode *inode = ractl->mapping->host;
277 struct address_space *mapping = ractl->mapping;
278 struct backing_dev_info *bdi = inode_to_bdi(mapping->host);
281 if (unlikely(!mapping->a_ops->readpage && !mapping->a_ops->readpages &&
282 !mapping->a_ops->readahead))
386 static pgoff_t count_history_pages(struct address_space *mapping,
392 head = page_cache_prev_miss(mapping, index - 1, max);
401 static int try_context_readahead(struct address_space *mapping,
409 size = count_history_pages(mapping, index, max);
439 struct backing_dev_info *bdi = inode_to_bdi(ractl->mapping->host);
480 start = page_cache_next_miss(ractl->mapping, index + 1,
514 if (try_context_readahead(ractl->mapping, ra, index, req_size,
600 if (inode_read_congested(ractl->mapping->host))