Lines Matching refs:index

116 	unsigned long index;
123 __radix_tree_lookup(&mapping->page_tree, page->index, &node, &slot);
145 index = page->index;
146 offset = index & RADIX_TREE_MAP_MASK;
149 radix_tree_tag_clear(&mapping->page_tree, index, tag);
198 /* Leave page->index set: truncation lookup relies upon it */
334 pgoff_t index = start_byte >> PAGE_CACHE_SHIFT;
344 while ((index <= end) &&
345 (nr_pages = pagevec_lookup_tag(&pvec, mapping, &index,
347 min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1)) != 0) {
354 if (page->index > end)
476 pgoff_t offset = old->index;
481 new->index = offset;
510 error = __radix_tree_create(&mapping->page_tree, page->index,
573 page->index = offset;
588 /* Leave page->index set: truncation relies upon it */
600 * @offset: page index
873 * @index: index
876 * Search the set [index, min(index+max_scan-1, MAX_INDEX)] for the
879 * Returns: the index of the hole if found, otherwise returns an index
880 * outside of the set specified (in which case 'return - index >=
881 * max_scan' will be true). In rare cases of index wrap-around, 0 will
887 * hole is created at index 5, then subsequently a hole is created at
888 * index 10, page_cache_next_hole covering both indexes may return 10
892 pgoff_t index, unsigned long max_scan)
899 page = radix_tree_lookup(&mapping->page_tree, index);
902 index++;
903 if (index == 0)
907 return index;
914 * @index: index
917 * Search backwards in the range [max(index-max_scan+1, 0), index] for
920 * Returns: the index of the hole if found, otherwise returns an index
921 * outside of the set specified (in which case 'index - return >=
928 * hole is created at index 10, then subsequently a hole is created at
929 * index 5, page_cache_prev_hole covering both indexes may return 5 if
933 pgoff_t index, unsigned long max_scan)
940 page = radix_tree_lookup(&mapping->page_tree, index);
943 index--;
944 if (index == ULONG_MAX)
948 return index;
955 * @offset: the page cache index
1011 * @offset: the page cache index
1038 VM_BUG_ON_PAGE(page->index != offset, page);
1047 * @offset: the page index
1098 VM_BUG_ON_PAGE(page->index != offset, page);
1141 * @start: The starting page cache index
1199 indices[ret] = iter.index;
1211 * @start: The starting page index
1247 * when entry at index 0 moves out of or back
1250 WARN_ON(iter.index);
1282 * @index: The starting page index
1291 unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t index,
1303 radix_tree_for_each_contig(slot, &mapping->page_tree, &iter, index) {
1315 * when entry at index 0 moves out of or back
1338 * must check mapping and index after taking the ref.
1342 if (page->mapping == NULL || page->index != iter.index) {
1359 * @index: the starting page index
1360 * @tag: the tag index
1365 * @tag. We update @index to index the next page for the traversal.
1367 unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index,
1380 &iter, *index, tag) {
1391 * when entry at index 0 moves out of or back
1427 *index = pages[ret - 1]->index + 1;
1473 pgoff_t index;
1480 index = *ppos >> PAGE_CACHE_SHIFT;
1494 page = find_get_page(mapping, index);
1498 index, last_index - index);
1499 page = find_get_page(mapping, index);
1506 index, last_index - index);
1534 if (unlikely(!isize || index > end_index)) {
1541 if (index == end_index) {
1561 if (prev_index != index || offset != prev_offset)
1563 prev_index = index;
1572 index += offset >> PAGE_CACHE_SHIFT;
1664 index, GFP_KERNEL);
1681 *ppos = ((loff_t)index << PAGE_CACHE_SHIFT) + offset;
1748 * @offset: page index
1919 VM_BUG_ON_PAGE(page->index != offset, page);
2005 if (iter.index > vmf->max_pgoff)
2038 if (page->index >= size >> PAGE_CACHE_SHIFT)
2041 pte = vmf->pte + page->index - vmf->pgoff;
2047 addr = address + (page->index - vmf->pgoff) * PAGE_SIZE;
2056 if (iter.index == vmf->max_pgoff)
2146 pgoff_t index,
2154 page = find_get_page(mapping, index);
2159 err = add_to_page_cache_lru(page, mapping, index, gfp);
2179 pgoff_t index,
2189 page = __read_cache_page(mapping, index, filler, data, gfp);
2222 * @index: the page index
2232 pgoff_t index,
2236 return do_read_cache_page(mapping, index, filler, data, mapping_gfp_mask(mapping));
2243 * @index: the page index
2246 * This is the same as "read_mapping_page(mapping, index, NULL)", but with
2252 pgoff_t index,
2257 return do_read_cache_page(mapping, index, filler, NULL, gfp);
2437 pgoff_t index, unsigned flags)
2445 page = pagecache_get_page(mapping, index, fgp_flags,