Migrate the backported radix tree code to lustre_compat.
Eventually, all of the Lustre/LNet compatability code
will live in lustre_compat - maintaining a clear
separation from the functional code in Lustre and LNet.
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Iaf6fed877b23829be948f1347d21e1ff7b9ce5a9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58148
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
EXTRA_DIST = linux-misc.h linux-fs.h linux-mem.h linux-time.h linux-cpu.h \
linux-list.h linux-hash.h linux-wait.h linux-net.h \
- generic-radix-tree.h refcount.h processor.h \
- linux-fortify-string.h
+ refcount.h processor.h linux-fortify-string.h
libcfs-linux-objs := linux-prim.o
libcfs-linux-objs += linux-hash.o
libcfs-linux-objs += linux-wait.o
-libcfs-linux-objs += generic-radix-tree.o
libcfs-compat-objs += $(patsubst %,$(COMPAT)%,$(compat_objs))
EXTRA_DIST = linux-prim.c \
linux-hash.c \
- linux-wait.c \
- generic-radix-tree.c
+ linux-wait.c
#define CFS_FAIL_MATCH_MD_NID 0xe001
#define CFS_FAIL_DELAY_MSG_FORWARD 0xe002
-#include <linux/generic-radix-tree.h>
+#include <lustre_compat/linux/generic-radix-tree.h>
#include <linux/netdevice.h>
#include <libcfs/libcfs.h>
#define DEBUG_SUBSYSTEM S_LNET
#include <linux/ctype.h>
-#include <linux/generic-radix-tree.h>
+#include <lustre_compat/linux/generic-radix-tree.h>
#include <linux/log2.h>
#include <linux/ktime.h>
#include <linux/moduleparam.h>
* Author: Liang Zhen <liangzhen@clusterfs.com>
*/
-#include <linux/generic-radix-tree.h>
+#include <lustre_compat/linux/generic-radix-tree.h>
#include <libcfs/linux/linux-net.h>
#include <libcfs/libcfs.h>
#include <lnet/lib-lnet.h>
#ifndef __LUSTRE_KERNELCOMM_H__
#define __LUSTRE_KERNELCOMM_H__
-#include <linux/generic-radix-tree.h>
+#include <lustre_compat/linux/generic-radix-tree.h>
#include <net/genetlink.h>
#include <net/sock.h>
/* For declarations shared with userspace */
#define D_MOUNT (D_SUPER | D_CONFIG /* | D_WARNING */)
#include <linux/types.h>
-#include <linux/generic-radix-tree.h>
+#include <lustre_compat/linux/generic-radix-tree.h>
#ifdef HAVE_LINUX_SELINUX_IS_ENABLED
#include <linux/selinux.h>
#endif
# This file is part of Lustre, http://www.lustre.org/
#
-EXTRA_DIST = xarray.h glob.h
+EXTRA_DIST = xarray.h glob.h generic-radix-tree.h
-#ifndef _LINUX_GENERIC_RADIX_TREE_H
-#define _LINUX_GENERIC_RADIX_TREE_H
+#ifndef _LINUX_GENERIC_RADIX_TREE_LUSTRE_H
+#define _LINUX_GENERIC_RADIX_TREE_LUSTRE_H
/**
* DOC: Generic radix trees/sparse arrays
_gfp)
-#endif /* _LINUX_GENERIC_RADIX_TREE_H */
+#else
+#include <linux/generic-radix-tree.h>
#endif /* ! HAVE_GENRADIX_SUPPORT */
+#endif /* _LINUX_GENERIC_RADIX_TREE_LUSTRE_H */
# This file is part of Lustre, http://www.lustre.org/
#
-compat_objs := xarray.o glob.o
+compat_objs := xarray.o glob.o generic-radix-tree.o
EXTRA_DIST = $(compat_objs:.o=.c)
/* Taken from 5.15 kernel */
#include <linux/export.h>
-#include <linux/generic-radix-tree.h>
+#include <lustre_compat/linux/generic-radix-tree.h>
#include <linux/gfp.h>
#include <linux/slab.h>
#include <linux/kmemleak.h>