page_cache_next_hole(9)

page_cache_next_hole9

Find the next hole (not-present entry)

Usage

pgoff_t page_cache_next_hole(struct address_space * mapping, pgoff_t index, unsigned long max_scan);

Arguments

mapping

mapping

index

index

max_scan

maximum range to search

Overview

Search the set [index, min(index+max_scan-1, MAX_INDEX)] for the lowest indexed hole.

Return

the index of the hole if found, otherwise returns an index outside of the set specified (in which case 'return - index >= max_scan' will be true). In rare cases of index wrap-around, 0 will be returned.

page_cache_next_hole may be called under rcu_read_lock. However, like radix_tree_gang_lookup, this will not atomically search a snapshot of the tree at a single point in time. For example, if a hole is created at index 5, then subsequently a hole is created at index 10, page_cache_next_hole covering both indexes may return 10 if called under rcu_read_lock.

Releases

2 releases since Debian 8 (Jessie); the text changed 1 time.

  1. 8
  2. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.