From c1f72a2c8569ed2ae14a45a224278f1a589c20c3 Mon Sep 17 00:00:00 2001 From: Emoly Liu Date: Thu, 29 Nov 2012 15:42:32 +0800 Subject: [PATCH] LU-1782 quota: ignore sb_has_quota_active() in OFED's header sb_has_quota_active() and sb_any_quota_active() are defined in ofed's backport headers, but if these are reffered on RHEL5's kernel, quota is broken. So, it ignores them. port of b1_8 patch df3a5407df2c21da2c43c8acc3624a93303c8856 Signed-off-by: Shuichi Ihara Signed-off-by: Liu Ying Change-Id: I608a45b86164fd42086a1e8e5fdc63071c3a17a8 Reviewed-on: http://review.whamcloud.com/4704 Reviewed-by: Niu Yawei Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 2191032..96a873e 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1967,33 +1967,43 @@ LB_LINUX_TRY_COMPILE([ # 2.6.27 sles11 has sb_any_quota_active AC_DEFUN([LC_SB_ANY_QUOTA_ACTIVE], [AC_MSG_CHECKING([Kernel has sb_any_quota_active]) -LB_LINUX_TRY_COMPILE([ - #include + # Ignore backported quotaops.h in OFED + if test -f $OFED_BACKPORT_PATH/linux/quotaops.h ; then + AC_MSG_RESULT(no) + else + LB_LINUX_TRY_COMPILE([ + #include ],[ - sb_any_quota_active(NULL); + sb_any_quota_active(NULL); ],[ - AC_DEFINE(HAVE_SB_ANY_QUOTA_ACTIVE, 1, - [Kernel has a sb_any_quota_active]) - AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_SB_ANY_QUOTA_ACTIVE, 1, + [Kernel has a sb_any_quota_active]) + AC_MSG_RESULT([yes]) ],[ - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) ]) + fi ]) # 2.6.27 sles11 has sb_has_quota_active AC_DEFUN([LC_SB_HAS_QUOTA_ACTIVE], [AC_MSG_CHECKING([Kernel has sb_has_quota_active]) -LB_LINUX_TRY_COMPILE([ - #include + # Ignore backported quotaops.h in OFED + if test -f $OFED_BACKPORT_PATH/linux/quotaops.h ; then + AC_MSG_RESULT(no) + else + LB_LINUX_TRY_COMPILE([ + #include ],[ - sb_has_quota_active(NULL, 0); + sb_has_quota_active(NULL, 0); ],[ - AC_DEFINE(HAVE_SB_HAS_QUOTA_ACTIVE, 1, - [Kernel has a sb_has_quota_active]) - AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_SB_HAS_QUOTA_ACTIVE, 1, + [Kernel has a sb_has_quota_active]) + AC_MSG_RESULT([yes]) ],[ - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) ]) + fi ]) # 2.6.27 exported add_to_page_cache_lru. -- 1.8.3.1