1PAGE_CACHE_PREV_HOLE(9)   Memory Management in Linux   PAGE_CACHE_PREV_HOLE(9)
2
3
4

NAME

6       page_cache_prev_hole - find the prev hole (not-present entry)
7

SYNOPSIS

9       pgoff_t page_cache_prev_hole(struct address_space * mapping,
10                                    pgoff_t index, unsigned long max_scan);
11

ARGUMENTS

13       mapping
14           mapping
15
16       index
17           index
18
19       max_scan
20           maximum range to search
21

DESCRIPTION

23       Search backwards in the range [max(index-max_scan+1, 0), index] for the
24       first hole.
25

RETURNS

27       the index of the hole if found, otherwise returns an index outside of
28       the set specified (in which case 'index - return >= max_scan' will be
29       true). In rare cases of wrap-around, ULONG_MAX will be returned.
30
31       page_cache_prev_hole may be called under rcu_read_lock. However, like
32       radix_tree_gang_lookup, this will not atomically search a snapshot of
33       the tree at a single point in time. For example, if a hole is created
34       at index 10, then subsequently a hole is created at index 5,
35       page_cache_prev_hole covering both indexes may return 5 if called under
36       rcu_read_lock.
37
39Kernel Hackers Manual 3.10         June 2019           PAGE_CACHE_PREV_HOLE(9)
Impressum