Whamcloud - gitweb
LU-8130 libcfs: don't use radix tree for xarray 62/56762/2
authorJames Simmons <jsimmons@infradead.org>
Wed, 23 Oct 2024 00:19:44 +0000 (17:19 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 5 Nov 2024 06:29:00 +0000 (06:29 +0000)
commit45c624eb4656a6d25e3557e453a5e27c02ffc7f5
tree674eb30b6a3894d17c32688fc7c70451e7dd2200
parent3b5949d5c0b5f6d04c38b17a05772c0c8c8f2da5
LU-8130 libcfs: don't use radix tree for xarray

For newer kernels the radix tree is totally based on Xarray. For Lustre
support for RHEL7 we backported Xarray but it still was using the
radix tree. Their is a mismatch between what the radix tree expects
and using a struct xa_node when allocating and freeing memory. Instead
abandon all use of the radix tree with Xarray. We use our own private
kmem cache which is based on radix tree but it uses xa_node.

Lustre-change: https://review.whamcloud.com/51840
Lustre-commit: 778791dd7da107710c2311935a24cfd7e7a5fd85

LU-17052 libcfs: fix build for old kernel

Fix build for kernel v4.17 to v4.19.
These old kernels already have xarray.h and #include by fs.h but
don't have full xarray support. It is needed to #include libcfs's
xarray.h also to contain xarray support.

Rename the header define macro to ensure libcfs's xarray.h will be
included。

Lustre-change: https://review.whamcloud.com/52090
Lustre-commit: 778791dd7da107710c2311935a24cfd7e7a5fd85

Test-Parameters: trivial
Test-Parameters: testlist=sanityn envdefinitions=ONLY=77,ONLY_REPEAT=20
Fixes: 84e12028be9a ("LU-9859 libcfs: add support for Xarray")
Fixes: 778791dd7da1 ("LU-8130 libcfs: don't use radix tree for xarray")
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Change-Id: I87607aa0e55a4aca039f2fef5a76fbff0bedd9b3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56762
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/linux/xarray.h
libcfs/libcfs/linux/linux-prim.c
libcfs/libcfs/linux/xarray.c