Lines Matching refs:offset
146 pgoff_t offset, unsigned long nr_to_read,
166 pgoff_t page_offset = offset + page_idx;
204 pgoff_t offset, unsigned long nr_to_read)
220 offset, this_chunk, 0);
226 offset += this_chunk;
334 * Count contiguously cached pages from @offset-1 to @offset-@max,
341 pgoff_t offset, unsigned long max)
346 head = radix_tree_prev_hole(&mapping->page_tree, offset - 1, max);
349 return offset - 1 - head;
357 pgoff_t offset,
363 size = count_history_pages(mapping, ra, offset, max);
376 if (size >= offset)
379 ra->start = offset;
392 bool hit_readahead_marker, pgoff_t offset,
400 if (!offset)
404 * It's the expected callback offset, assume sequential access.
407 if ((offset == (ra->start + ra->size - ra->async_size) ||
408 offset == (ra->start + ra->size))) {
425 start = radix_tree_next_hole(&mapping->page_tree, offset+1,max);
428 if (!start || start - offset > max)
432 ra->size = start - offset; /* old async_size */
448 if (offset - (ra->prev_pos >> PAGE_CACHE_SHIFT) <= 1UL)
455 if (try_context_readahead(mapping, ra, offset, req_size, max))
462 return __do_page_cache_readahead(mapping, filp, offset, req_size, 0);
465 ra->start = offset;
475 if (offset == ra->start && ra->size == ra->async_size) {
488 * @offset: start offset into @mapping, in pagecache page-sized units
499 pgoff_t offset, unsigned long req_size)
507 force_page_cache_readahead(mapping, filp, offset, req_size);
512 ondemand_readahead(mapping, ra, filp, false, offset, req_size);
521 * @page: the page at @offset which has the PG_readahead flag set
522 * @offset: start offset into @mapping, in pagecache page-sized units
534 struct page *page, pgoff_t offset,
556 ondemand_readahead(mapping, ra, filp, true, offset, req_size);