aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2017-11-14 16:42:22 -0500
committerMatthew Wilcox <willy@infradead.org>2018-10-21 10:45:58 -0400
commit80a0a1a9a3cde9b23851e8eb7160e2786549306a (patch)
tree9f90a533bb16d5f91407e6d04d102ea4dbca225e /include
parentxarray: Add XArray iterators (diff)
downloadlinux-dev-80a0a1a9a3cde9b23851e8eb7160e2786549306a.tar.xz
linux-dev-80a0a1a9a3cde9b23851e8eb7160e2786549306a.zip
xarray: Extract entries from an XArray
The xa_extract function combines the functionality of radix_tree_gang_lookup() and radix_tree_gang_lookup_tagged(). It extracts entries matching the specified filter into a normal array. Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/xarray.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/xarray.h b/include/linux/xarray.h
index 66b10efa5a50..82ceed981924 100644
--- a/include/linux/xarray.h
+++ b/include/linux/xarray.h
@@ -284,6 +284,8 @@ void *xa_find(struct xarray *xa, unsigned long *index,
unsigned long max, xa_mark_t) __attribute__((nonnull(2)));
void *xa_find_after(struct xarray *xa, unsigned long *index,
unsigned long max, xa_mark_t) __attribute__((nonnull(2)));
+unsigned int xa_extract(struct xarray *, void **dst, unsigned long start,
+ unsigned long max, unsigned int n, xa_mark_t);
/**
* xa_init() - Initialise an empty XArray.