• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/mm/

Lines Matching refs:mapping

26 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)
28 ra->ra_pages = mapping->backing_dev_info->ra_pages;
42 static void read_cache_pages_invalidate_page(struct address_space *mapping,
48 page->mapping = mapping;
50 page->mapping = NULL;
59 static void read_cache_pages_invalidate_pages(struct address_space *mapping,
67 read_cache_pages_invalidate_page(mapping, victim);
73 * @mapping: the address_space
81 int read_cache_pages(struct address_space *mapping, struct list_head *pages,
90 if (add_to_page_cache_lru(page, mapping,
92 read_cache_pages_invalidate_page(mapping, page);
99 read_cache_pages_invalidate_pages(mapping, pages);
109 static int read_pages(struct address_space *mapping, struct file *filp,
115 if (mapping->a_ops->readpages) {
116 ret = mapping->a_ops->readpages(filp, mapping, pages, nr_pages);
125 if (!add_to_page_cache_lru(page, mapping,
127 mapping->a_ops->readpage(filp, page);
145 __do_page_cache_readahead(struct address_space *mapping, struct file *filp,
149 struct inode *inode = mapping->host;
172 page = radix_tree_lookup(&mapping->page_tree, page_offset);
177 page = page_cache_alloc_cold(mapping);
193 read_pages(mapping, filp, &page_pool, ret);
203 int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
208 if (unlikely(!mapping->a_ops->readpage && !mapping->a_ops->readpages))
219 err = __do_page_cache_readahead(mapping, filp,
246 struct address_space *mapping, struct file *filp)
250 actual = __do_page_cache_readahead(mapping, filp,
339 static pgoff_t count_history_pages(struct address_space *mapping,
346 head = radix_tree_prev_hole(&mapping->page_tree, offset - 1, max);
355 static int try_context_readahead(struct address_space *mapping,
363 size = count_history_pages(mapping, ra, offset, max);
390 ondemand_readahead(struct address_space *mapping,
425 start = radix_tree_next_hole(&mapping->page_tree, offset+1,max);
455 if (try_context_readahead(mapping, ra, offset, req_size, max))
462 return __do_page_cache_readahead(mapping, filp, offset, req_size, 0);
480 return ra_submit(ra, mapping, filp);
485 * @mapping: address_space which holds the pagecache and I/O vectors
488 * @offset: start offset into @mapping, in pagecache page-sized units
497 void page_cache_sync_readahead(struct address_space *mapping,
507 force_page_cache_readahead(mapping, filp, offset, req_size);
512 ondemand_readahead(mapping, ra, filp, false, offset, req_size);
518 * @mapping: address_space which holds the pagecache and I/O vectors
522 * @offset: start offset into @mapping, in pagecache page-sized units
532 page_cache_async_readahead(struct address_space *mapping,
552 if (bdi_read_congested(mapping->backing_dev_info))
556 ondemand_readahead(mapping, ra, filp, true, offset, req_size);
567 blk_run_backing_dev(mapping->backing_dev_info, NULL);