summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2002-10-02 22:57:24 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-10-02 22:57:24 -0700
commit55b407322622e0d86acda07f756cb08879030a90 (patch)
tree60c1d6f6e45de31119ae060bbbecc252a4f81abe /include/linux
parent803f57a858e00ea90e067f931bd13b6b5e850f38 (diff)
[PATCH] radix tree gang lookup
Adds a gang lookup facility to radix trees. It provides an efficient means of locating a bunch of pages starting at a particular offset. The implementation is a bit dumb, but is efficient enough. And it is amenable to the `tagged lookup' extension which is proving tricky to write, but which will allow the dirty pages within a mapping to be located in pgoff_t order. Thanks are due to Huch Dickins for finding and fixing an unpleasant bug in here.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/radix-tree.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index fb2e3f3350d3..56d1c668ff2e 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -45,5 +45,8 @@ extern int radix_tree_reserve(struct radix_tree_root *, unsigned long, void ***)
extern int radix_tree_insert(struct radix_tree_root *, unsigned long, void *);
extern void *radix_tree_lookup(struct radix_tree_root *, unsigned long);
extern int radix_tree_delete(struct radix_tree_root *, unsigned long);
+extern unsigned int
+radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
+ unsigned long first_index, unsigned int max_items);
#endif /* _LINUX_RADIX_TREE_H */