• Home
  • Raw
  • Download

Lines Matching refs:index

99 		if (add_to_page_cache_lru(page, mapping, page->index,  in read_cache_pages()
188 unsigned long index = readahead_index(ractl); in page_cache_ra_unbounded() local
209 struct page *page = xa_load(&mapping->i_pages, index + i); in page_cache_ra_unbounded()
211 BUG_ON(index + i != ractl->_index + ractl->_nr_pages); in page_cache_ra_unbounded()
230 page->index = index + i; in page_cache_ra_unbounded()
232 } else if (add_to_page_cache_lru(page, mapping, index + i, in page_cache_ra_unbounded()
263 unsigned long index = readahead_index(ractl); in do_page_cache_ra() local
271 if (index > end_index) in do_page_cache_ra()
274 if (nr_to_read > end_index - index) in do_page_cache_ra()
275 nr_to_read = end_index - index + 1; in do_page_cache_ra()
289 unsigned long max_pages, index; in force_page_cache_ra() local
299 index = readahead_index(ractl); in force_page_cache_ra()
307 ractl->_index = index; in force_page_cache_ra()
310 index += this_chunk; in force_page_cache_ra()
397 pgoff_t index, unsigned long max) in count_history_pages() argument
402 head = page_cache_prev_miss(mapping, index - 1, max); in count_history_pages()
405 return index - 1 - head; in count_history_pages()
413 pgoff_t index, in try_context_readahead() argument
419 size = count_history_pages(mapping, index, max); in try_context_readahead()
432 if (size >= index) in try_context_readahead()
435 ra->start = index; in try_context_readahead()
452 unsigned long index = readahead_index(ractl); in ondemand_readahead() local
467 if (!index) in ondemand_readahead()
474 if ((index == (ra->start + ra->size - ra->async_size) || in ondemand_readahead()
475 index == (ra->start + ra->size))) { in ondemand_readahead()
492 start = page_cache_next_miss(ractl->mapping, index + 1, in ondemand_readahead()
496 if (!start || start - index > max_pages) in ondemand_readahead()
500 ra->size = start - index; /* old async_size */ in ondemand_readahead()
519 if (index - prev_index <= 1UL) in ondemand_readahead()
526 if (try_context_readahead(ractl->mapping, ra, index, req_size, in ondemand_readahead()
538 ra->start = index; in ondemand_readahead()
549 if (index == ra->start && ra->size == ra->async_size) { in ondemand_readahead()