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

NAME

6       page_cache_next_hole - find the next hole (not-present entry)
7

SYNOPSIS

9       pgoff_t page_cache_next_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 the set [index, min(index+max_scan-1, MAX_INDEX)] for the lowest
24       indexed hole.
25

RETURNS

27       the index of the hole if found, otherwise returns an index outside of
28       the set specified (in which case 'return - index >= max_scan' will be
29       true). In rare cases of index wrap-around, 0 will be returned.
30
31       page_cache_next_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 5, then subsequently a hole is created at index 10,
35       page_cache_next_hole covering both indexes may return 10 if called
36       under rcu_read_lock.
37
39Kernel Hackers Manual 3.10         June 2019           PAGE_CACHE_NEXT_HOLE(9)
Impressum