Whamcloud - gitweb
LU-18687 compat: move glob to lustre_compat 45/58145/2
authorTimothy Day <timday@amazon.com>
Fri, 21 Feb 2025 15:55:18 +0000 (15:55 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Mar 2025 23:34:05 +0000 (23:34 +0000)
Migrate the backported glob 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: I7e57326a0ed10225e2ee866071ea7c3d259d29d4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58145
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>
libcfs/include/libcfs/linux/Makefile.am
libcfs/libcfs/Makefile.in
libcfs/libcfs/linux/Makefile.am
lustre/obdclass/kernelcomm.c
lustre/obdclass/lprocfs_status.c
lustre_compat/include/lustre_compat/linux/Makefile.am
lustre_compat/include/lustre_compat/linux/glob.h [moved from libcfs/include/libcfs/linux/glob.h with 65% similarity]
lustre_compat/lib/Makefile.in
lustre_compat/lib/glob.c [moved from libcfs/libcfs/linux/glob.c with 98% similarity]

index 63043d1..b68341c 100644 (file)
@@ -6,5 +6,5 @@
 
 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 glob.h refcount.h processor.h \
+            generic-radix-tree.h refcount.h processor.h \
             linux-fortify-string.h
index 112db33..c4f9a6a 100644 (file)
@@ -15,7 +15,6 @@ 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-linux-objs += glob.o
 
 libcfs-compat-objs += $(patsubst %,$(COMPAT)%,$(compat_objs))
 
index e4027de..22bc2eb 100644 (file)
@@ -7,5 +7,4 @@
 EXTRA_DIST = linux-prim.c \
             linux-hash.c \
             linux-wait.c \
-            generic-radix-tree.c \
-            glob.c
+            generic-radix-tree.c
index 40c0a2d..06f7733 100644 (file)
@@ -19,7 +19,7 @@
 #define DEBUG_SUBSYSTEM S_CLASS
 
 #include <linux/file.h>
-#include <linux/glob.h>
+#include <lustre_compat/linux/glob.h>
 #include <linux/types.h>
 
 #include <libcfs/linux/linux-net.h>
index 7973079..68d1f0a 100644 (file)
@@ -15,7 +15,7 @@
 
 #define DEBUG_SUBSYSTEM S_CLASS
 
-#include <linux/glob.h>
+#include <lustre_compat/linux/glob.h>
 #include <obd_class.h>
 #include <lprocfs_status.h>
 #include <lustre_kernelcomm.h>
index 303749c..6cf90d8 100644 (file)
@@ -4,4 +4,4 @@
 # This file is part of Lustre, http://www.lustre.org/
 #
 
-EXTRA_DIST = xarray.h
+EXTRA_DIST = xarray.h glob.h
similarity index 65%
rename from libcfs/include/libcfs/linux/glob.h
rename to lustre_compat/include/lustre_compat/linux/glob.h
index 401661a..2345a20 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 
-#ifndef _LINUX_GLOB_H
-#define _LINUX_GLOB_H
+#ifndef _LINUX_GLOB_LUSTRE_H
+#define _LINUX_GLOB_LUSTRE_H
 
 #ifndef HAVE_GLOB
 
@@ -9,6 +9,9 @@
 #include <linux/compiler.h>    /* For __pure */
 
 bool __pure glob_match(char const *pat, char const *str);
+
+#else
+#include <linux/glob.h>
 #endif /* !HAVE_GLOB */
 
-#endif /* _LINUX_GLOB_H */
+#endif /* _LINUX_GLOB_LUSTRE_H */
index 944a5f5..cbf777f 100644 (file)
@@ -4,7 +4,7 @@
 # This file is part of Lustre, http://www.lustre.org/
 #
 
-compat_objs := xarray.o
+compat_objs := xarray.o glob.o
 
 EXTRA_DIST = $(compat_objs:.o=.c)
 
similarity index 98%
rename from libcfs/libcfs/linux/glob.c
rename to lustre_compat/lib/glob.c
index 9019246..efbcc1d 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef HAVE_GLOB
 #include <linux/module.h>
-#include "libcfs/linux/glob.h"
+#include <lustre_compat/linux/glob.h>
 
 /**
  * glob_match - Shell-style pattern matching, like !fnmatch(pat, str, 0)