Lines Matching defs:index

81  *   pages have their ->index populated and are otherwise uninitialised.
98 if (add_to_page_cache_lru(page, mapping, page->index,
178 unsigned long index = readahead_index(ractl);
199 struct page *page = xa_load(&mapping->i_pages, index + i);
201 BUG_ON(index + i != ractl->_index + ractl->_nr_pages);
220 page->index = index + i;
222 } else if (add_to_page_cache_lru(page, mapping, index + i,
253 unsigned long index = readahead_index(ractl);
261 if (index > end_index)
264 if (nr_to_read > end_index - index)
265 nr_to_read = end_index - index + 1;
279 unsigned long max_pages, index;
289 index = readahead_index(ractl);
297 ractl->_index = index;
300 index += this_chunk;
381 * Count contiguously cached pages from @index-1 to @index-@max,
387 pgoff_t index, unsigned long max)
392 head = page_cache_prev_miss(mapping, index - 1, max);
395 return index - 1 - head;
403 pgoff_t index,
409 size = count_history_pages(mapping, index, max);
422 if (size >= index)
425 ra->start = index;
442 unsigned long index = readahead_index(ractl);
455 if (!index)
459 * It's the expected callback index, assume sequential access.
462 if ((index == (ra->start + ra->size - ra->async_size) ||
463 index == (ra->start + ra->size))) {
480 start = page_cache_next_miss(ractl->mapping, index + 1,
484 if (!start || start - index > max_pages)
488 ra->size = start - index; /* old async_size */
503 * trivial case: (index - prev_index) == 1
504 * unaligned reads: (index - prev_index) == 0
507 if (index - prev_index <= 1UL)
514 if (try_context_readahead(ractl->mapping, ra, index, req_size,
526 ra->start = index;
537 if (index == ra->start && ra->size == ra->async_size) {