Whamcloud - gitweb
LU-18687 compat: move generic-radix-tree to lustre_compat 48/58148/2
authorTimothy Day <timday@amazon.com>
Fri, 21 Feb 2025 17:20:06 +0000 (17:20 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Mar 2025 23:34:15 +0000 (23:34 +0000)
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>
12 files changed:
libcfs/include/libcfs/linux/Makefile.am
libcfs/libcfs/Makefile.in
libcfs/libcfs/linux/Makefile.am
lnet/include/lnet/lib-lnet.h
lnet/lnet/api-ni.c
lnet/selftest/conctl.c
lustre/include/lustre_kernelcomm.h
lustre/target/tgt_mount.c
lustre_compat/include/lustre_compat/linux/Makefile.am
lustre_compat/include/lustre_compat/linux/generic-radix-tree.h [moved from libcfs/include/libcfs/linux/generic-radix-tree.h with 97% similarity]
lustre_compat/lib/Makefile.in
lustre_compat/lib/generic-radix-tree.c [moved from libcfs/libcfs/linux/generic-radix-tree.c with 99% similarity]

index b68341c..f788f9d 100644 (file)
@@ -6,5 +6,4 @@
 
 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
index c4f9a6a..81c6cc6 100644 (file)
@@ -14,7 +14,6 @@ libcfs_dir := $(dir $(lastword $(MAKEFILE_LIST)))
 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))
 
index 22bc2eb..52fddc2 100644 (file)
@@ -6,5 +6,4 @@
 
 EXTRA_DIST = linux-prim.c \
             linux-hash.c \
-            linux-wait.c \
-            generic-radix-tree.c
+            linux-wait.c
index 519870f..8881f7a 100644 (file)
@@ -19,7 +19,7 @@
 #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>
index 951aa64..43b0af9 100644 (file)
@@ -11,7 +11,7 @@
 #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>
index 785e6bb..3ac930d 100644 (file)
@@ -15,7 +15,7 @@
  * 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>
index cb85267..6cb594c 100644 (file)
@@ -19,7 +19,7 @@
 #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 */
index 28cbea1..e3f3df1 100644 (file)
@@ -19,7 +19,7 @@
 #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
index 6cf90d8..da9f069 100644 (file)
@@ -4,4 +4,4 @@
 # 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
@@ -1,5 +1,5 @@
-#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
@@ -231,5 +231,7 @@ int __genradix_prealloc(struct __genradix *, size_t, gfp_t);
                        _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 */
index cbf777f..baf5240 100644 (file)
@@ -4,7 +4,7 @@
 # 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)
 
similarity index 99%
rename from libcfs/libcfs/linux/generic-radix-tree.c
rename to lustre_compat/lib/generic-radix-tree.c
index ac96895..e2d3b0f 100644 (file)
@@ -3,7 +3,7 @@
 /* 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>