From ce55815fb77a2a24809e9077c019313900b1007d Mon Sep 17 00:00:00 2001 From: Yang Sheng Date: Tue, 17 Jun 2014 12:43:26 +0800 Subject: [PATCH] LU-5205 mdc: Add config check for Xeon Phi build Add config check for radix_tree_exception_entry() to not broken Xeon Phi build. Signed-off-by: Yang Sheng Change-Id: I2f405e392003162e779ffbf9055e410917940df7 Reviewed-on: http://review.whamcloud.com/10734 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 17 +++++++++++++++++ lustre/include/linux/lustre_compat25.h | 7 +++++++ 2 files changed, 24 insertions(+) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index ac1696e..b8be8cf 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -867,6 +867,22 @@ LB_CHECK_EXPORT([generic_file_llseek_size], [fs/read_write.c], ]) # LC_FILE_LLSEEK_SIZE # +# LC_RADIX_EXCEPTION_ENTRY +# 3.1 adds radix_tree_exception_entry. +# +AC_DEFUN([LC_RADIX_EXCEPTION_ENTRY], [ +LB_CHECK_COMPILE([radix_tree_exceptional_entry exist], +radix_tree_exceptional_entry, [ + #include +],[ + radix_tree_exceptional_entry(NULL); +],[ + AC_DEFINE(HAVE_RADIX_EXCEPTION_ENTRY, 1, + [radix_tree_exceptional_entry exist]) +]) +]) # LC_RADIX_EXCEPTION_ENTRY + +# # LC_HAVE_VOID_MAKE_REQUEST_FN # # 3.2 request_queue.make_request_fn defined as function returns with void @@ -1516,6 +1532,7 @@ AC_DEFUN([LC_PROG_LINUX], [ LC_IOP_GET_ACL LC_FILE_LLSEEK_SIZE LC_INODE_PERMISION_2ARGS + LC_RADIX_EXCEPTION_ENTRY # 3.2 LC_HAVE_VOID_MAKE_REQUEST_FN diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 3dac0d1..4b6fddf 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -352,4 +352,11 @@ static inline struct dentry *d_make_root(struct inode *root) #define ll_vfs_unlink(a, b) vfs_unlink(a, b) #endif +#ifndef HAVE_RADIX_EXCEPTION_ENTRY +static inline int radix_tree_exceptional_entry(void *arg) +{ + return 0; +} +#endif + #endif /* _COMPAT25_H */ -- 1.8.3.1