xarray: Add XArray load operation
authorMatthew Wilcox <willy@infradead.org>
Tue, 7 Nov 2017 19:57:46 +0000 (14:57 -0500)
committerMatthew Wilcox <willy@infradead.org>
Sun, 21 Oct 2018 14:45:57 +0000 (10:45 -0400)
commitad3d6c7263e368abdc151e1cc13dc78aa39cc7a7
tree54279b42ac6fbede3abc75ea44fbe1554b633228
parent992a8e60e3fea77c55589fc1c5af2304e78a5baa
xarray: Add XArray load operation

The xa_load function brings with it a lot of infrastructure; xa_empty(),
xa_is_err(), and large chunks of the XArray advanced API that are used
to implement xa_load.

As the test-suite demonstrates, it is possible to use the XArray functions
on a radix tree.  The radix tree functions depend on the GFP flags being
stored in the root of the tree, so it's not possible to use the radix
tree functions on an XArray.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
14 files changed:
include/linux/xarray.h
lib/Kconfig.debug
lib/Makefile
lib/radix-tree.c
lib/test_xarray.c [new file with mode: 0644]
lib/xarray.c
tools/include/linux/kernel.h
tools/testing/radix-tree/.gitignore
tools/testing/radix-tree/Makefile
tools/testing/radix-tree/linux/kernel.h
tools/testing/radix-tree/linux/rcupdate.h
tools/testing/radix-tree/main.c
tools/testing/radix-tree/test.h
tools/testing/radix-tree/xarray.c