Lines Matching refs:mapping

39 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)  in file_ra_state_init()  argument
41 ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages; in file_ra_state_init()
53 static void read_cache_pages_invalidate_page(struct address_space *mapping, in read_cache_pages_invalidate_page() argument
59 page->mapping = mapping; in read_cache_pages_invalidate_page()
61 page->mapping = NULL; in read_cache_pages_invalidate_page()
70 static void read_cache_pages_invalidate_pages(struct address_space *mapping, in read_cache_pages_invalidate_pages() argument
78 read_cache_pages_invalidate_page(mapping, victim); in read_cache_pages_invalidate_pages()
94 int read_cache_pages(struct address_space *mapping, struct list_head *pages, in read_cache_pages() argument
103 if (add_to_page_cache_lru(page, mapping, page->index, in read_cache_pages()
104 readahead_gfp_mask(mapping))) { in read_cache_pages()
105 read_cache_pages_invalidate_page(mapping, page); in read_cache_pages()
112 read_cache_pages_invalidate_pages(mapping, pages); in read_cache_pages()
134 const struct address_space_operations *aops = rac->mapping->a_ops; in read_pages()
151 aops->readpages(rac->file, rac->mapping, pages, in read_pages()
191 struct address_space *mapping = ractl->mapping; in page_cache_ra_unbounded() local
194 gfp_t gfp_mask = readahead_gfp_mask(mapping); in page_cache_ra_unbounded()
213 struct page *page = xa_load(&mapping->i_pages, index + i); in page_cache_ra_unbounded()
233 if (mapping->a_ops->readpages) { in page_cache_ra_unbounded()
236 } else if (add_to_page_cache_lru(page, mapping, index + i, in page_cache_ra_unbounded()
266 struct inode *inode = ractl->mapping->host; in do_page_cache_ra()
291 struct address_space *mapping = ractl->mapping; in force_page_cache_ra() local
292 struct backing_dev_info *bdi = inode_to_bdi(mapping->host); in force_page_cache_ra()
298 if (unlikely(!mapping->a_ops->readpage && !mapping->a_ops->readpages && in force_page_cache_ra()
299 !mapping->a_ops->readahead)) in force_page_cache_ra()
312 if (nr_to_read > max_pages && fscrypt_inode_uses_fs_layer_crypto(mapping->host)) in force_page_cache_ra()
417 static pgoff_t count_history_pages(struct address_space *mapping, in count_history_pages() argument
423 head = page_cache_prev_miss(mapping, index - 1, max); in count_history_pages()
432 static int try_context_readahead(struct address_space *mapping, in try_context_readahead() argument
440 size = count_history_pages(mapping, index, max); in try_context_readahead()
470 struct backing_dev_info *bdi = inode_to_bdi(ractl->mapping->host); in ondemand_readahead()
513 start = page_cache_next_miss(ractl->mapping, index + 1, in ondemand_readahead()
547 if (try_context_readahead(ractl->mapping, ra, index, req_size, in ondemand_readahead()
633 if (inode_read_congested(ractl->mapping->host)) in page_cache_async_ra()