Whamcloud - gitweb
LU-17052 libcfs: fix build for old kernel 90/52090/4
authorXinliang Liu <xinliang.liu@linaro.org>
Fri, 25 Aug 2023 03:24:12 +0000 (03:24 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 6 Sep 2023 06:15:36 +0000 (06:15 +0000)
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。

Test-Parameters: trivial
Test-Parameters: testlist=sanityn envdefinitions=ONLY=77,ONLY_REPEAT=20
Fixes: 778791dd7da1 ("LU-8130 libcfs: don't use radix tree for xarray")
Change-Id: I760c394cc1d885c2de79d1770243ab7f292b9b3a
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52090
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
libcfs/include/libcfs/linux/xarray.h

index 74397ab..b252aaf 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
-#ifndef _LINUX_XARRAY_H
-#define _LINUX_XARRAY_H
+#ifndef _LINUX_XARRAY_LUSTRE_H
+#define _LINUX_XARRAY_LUSTRE_H
 /*
  * eXtensible Arrays
  * Copyright (c) 2017 Microsoft Corporation
@@ -1763,4 +1763,4 @@ static inline void *xas_next(struct xa_state *xas)
 }
 #endif /* !HAVE_XARRAY_SUPPORT */
 
-#endif /* _LINUX_XARRAY_H */
+#endif /* _LINUX_XARRAY_LUSTRE_H */