From df3a5407df2c21da2c43c8acc3624a93303c8856 Mon Sep 17 00:00:00 2001 From: Shuichi Ihara Date: Fri, 24 Aug 2012 01:36:46 +0900 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. Signed-off-by: Shuichi Ihara Change-Id: Ic78799bc5d948b583b4a515479d5091381c63185 Reviewed-on: http://review.whamcloud.com/3764 Reviewed-by: Niu Yawei Tested-by: Hudson Tested-by: Maloo Reviewed-by: Johann Lombardi --- 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 1a86fce..9385d01 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1570,33 +1570,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 has inode_permission instead of permisson -- 1.8.3.1