From a0b301138c76f411dc7d087542a123fe5ea4b682 Mon Sep 17 00:00:00 2001 From: tianzy Date: Mon, 8 Sep 2008 06:53:09 +0000 Subject: [PATCH] Branch b1_8 lfs lacks quota support if building with confiugre --disable-modules b=16481 i=shadow i=rread --- lustre/autoconf/lustre-core.m4 | 59 ++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 901ab70..984f53d 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1332,10 +1332,10 @@ AC_DEFUN([LC_PROG_LINUX], LC_CONFIG_PINGER LC_CONFIG_CHECKSUM LC_CONFIG_LIBLUSTRE_RECOVERY - LC_CONFIG_QUOTA LC_CONFIG_HEALTH_CHECK_WRITE LC_CONFIG_LRU_RESIZE LC_CONFIG_ADAPTIVE_TIMEOUTS + LC_QUOTA_MODULE LC_TASK_PPTR # RHEL4 patches @@ -1558,35 +1558,54 @@ fi # # LC_CONFIG_QUOTA # -# whether to enable quota support +# whether to enable quota support global control # AC_DEFUN([LC_CONFIG_QUOTA], -[AC_ARG_ENABLE([quota], +[AC_ARG_ENABLE([quota], AC_HELP_STRING([--enable-quota], [enable quota support]), - [],[enable_quota='default']) -if test x$linux25 != xyes; then - enable_quota='no' + [],[enable_quota='yes']) +]) + +# whether to enable quota support(kernel modules) +AC_DEFUN([LC_QUOTA_MODULE], +[if test x$enable_quota != xno; then + LB_LINUX_CONFIG([QUOTA],[ + enable_quota_module='yes' + AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support]) + ],[ + enable_quota_module='no' + AC_MSG_WARN([quota is not enabled because the kernel - lacks quota support]) + ]) fi -LB_LINUX_CONFIG([QUOTA],[ - if test x$enable_quota = xdefault; then - enable_quota='yes' - fi -],[ - if test x$enable_quota = xdefault; then - enable_quota='no' - AC_MSG_WARN([quota is not enabled because the kernel lacks quota support]) - else - if test x$enable_quota = xyes; then - AC_MSG_ERROR([cannot enable quota because the kernel lacks quota support]) - fi - fi ]) + +# +# LC_CONFIG_QUOTA_LIBLUSTRE +# +# whether to enable quota support(liblustre) +# +AC_DEFUN([LC_CONFIG_QUOTA_LIBLUSTRE], +[enable_quota_liblustre='no' if test x$enable_quota != xno; then + AC_MSG_CHECKING([if compile liblustre with quota]) + enable_quota_liblustre='yes' AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support]) + AC_DEFINE(HAVE_QUOTA_LIBLUSTRE_SUPPORT, 1, [Enable liblustre quota support]) + AC_MSG_RESULT([yes]) fi ]) +AC_DEFUN([LC_QUOTA], +[#check global +LC_CONFIG_QUOTA +LC_CONFIG_QUOTA_LIBLUSTRE +#check for utils +AC_CHECK_HEADER(sys/quota.h, + [AC_DEFINE(HAVE_SYS_QUOTA_H, 1, [Define to 1 if you have .])], + [AC_MSG_ERROR([don't find in your system])]) +]) + AC_DEFUN([LC_QUOTA_READ], [AC_MSG_CHECKING([if kernel supports quota_read]) LB_LINUX_TRY_COMPILE([ @@ -1809,7 +1828,7 @@ AM_CONDITIONAL(LIBLUSTRE_TESTS, test x$enable_liblustre_tests = xyes) AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests) AM_CONDITIONAL(CLIENT, test x$enable_client = xyes) AM_CONDITIONAL(SERVER, test x$enable_server = xyes) -AM_CONDITIONAL(QUOTA, test x$enable_quota = xyes) +AM_CONDITIONAL(QUOTA, test x$enable_quota_module = xyes -o x$enable_quota_liblustre = xyes) AM_CONDITIONAL(BLKID, test x$ac_cv_header_blkid_blkid_h = xyes) AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes) AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes) -- 1.8.3.1