diff options
author | Matthew Wilcox <willy@infradead.org> | 2017-11-21 14:07:06 -0500 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2018-10-21 10:46:33 -0400 |
commit | 0d3f92966629e536b0c5c2355c1ada8e21c245f6 (patch) | |
tree | 1fe6674dbc2e0164749a904c29065dec9a707ac1 /include/linux/pagemap.h | |
parent | eb797a8ee0ab4cd03df556980ce7bf167cadaa50 (diff) | |
download | linux-0d3f92966629e536b0c5c2355c1ada8e21c245f6.tar.gz linux-0d3f92966629e536b0c5c2355c1ada8e21c245f6.tar.bz2 linux-0d3f92966629e536b0c5c2355c1ada8e21c245f6.zip |
page cache: Convert hole search to XArray
The page cache offers the ability to search for a miss in the previous or
next N locations. Rather than teach the XArray about the page cache's
definition of a miss, use xas_prev() and xas_next() to search the page
array. This should be more efficient as it does not have to start the
lookup from the top for each index.
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'include/linux/pagemap.h')
-rw-r--r-- | include/linux/pagemap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index b1bd2186e6d2..cf9ad413eee9 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -241,9 +241,9 @@ static inline gfp_t readahead_gfp_mask(struct address_space *x) typedef int filler_t(void *, struct page *); -pgoff_t page_cache_next_hole(struct address_space *mapping, +pgoff_t page_cache_next_miss(struct address_space *mapping, pgoff_t index, unsigned long max_scan); -pgoff_t page_cache_prev_hole(struct address_space *mapping, +pgoff_t page_cache_prev_miss(struct address_space *mapping, pgoff_t index, unsigned long max_scan); #define FGP_ACCESSED 0x00000001 |