From 643a435dc9a09c5cf85c1b854221384e8060fd48 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Mon, 25 May 2009 13:28:30 +0000 Subject: [PATCH] Branch b1_6 b=18718 i=joahnn, shadow fixed the build for sles9. --- lustre/autoconf/lustre-core.m4 | 12 ++++++++++++ lustre/include/linux/lustre_compat25.h | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 9572896..c2677a4 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1480,6 +1480,15 @@ LB_LINUX_TRY_COMPILE([ EXTRA_KCFLAGS="$tmp_flags" ]) +# 2.6.5 sles9 hasn't define sysctl_vfs_cache_pressure +AC_DEFUN([LC_HAVE_SYSCTL_VFS_CACHE_PRESSURE], +[LB_CHECK_SYMBOL_EXPORT([sysctl_vfs_cache_pressure], +[fs/dcache.c],[ + AC_DEFINE(HAVE_SYSCTL_VFS_CACHE_PRESSURE, 1, [kernel exports sysctl_vfs_cache_pressure]) +],[ +]) +]) + # # LC_PROG_LINUX # @@ -1534,6 +1543,9 @@ AC_DEFUN([LC_PROG_LINUX], # does the kernel have VFS intent patches? LC_VFS_INTENT_PATCHES + # 2.6.5 sles9 + LC_HAVE_SYSCTL_VFS_CACHE_PRESSURE + # 2.6.12 LC_EXPORT_SYNCHRONIZE_RCU diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 09d4c71..050c8f9 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -506,5 +506,9 @@ static inline long labs(long x) #define INODE_PRIVATE_DATA(inode) ((inode)->u.generic_ip) #endif +#ifndef HAVE_SYSCTL_VFS_CACHE_PRESSURE +#define sysctl_vfs_cache_pressure 100 +#endif + #endif /* __KERNEL__ */ #endif /* _COMPAT25_H */ -- 1.8.3.1