From: Jian Yu Date: Thu, 30 Mar 2023 17:43:48 +0000 (-0700) Subject: LU-16517 build: pass extra configure options to "make debs" X-Git-Tag: 2.15.56~14 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;ds=inline;h=3989529f22f5c54a98e445674b4b3cc443a3af5f;p=fs%2Flustre-release.git LU-16517 build: pass extra configure options to "make debs" While running "make debs", the configure command in debian/rules ignores some user defined configure options. This patch fixes the issue by adding the detection of the extra options into debian/rules. Test-Parameters: trivial clientdistro=ubuntu2204 Change-Id: Ia9db4e05abf33834cb3c853f4f0829dadc8d7400 Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50464 Tested-by: jenkins Tested-by: Maloo Tested-by: Shuichi Ihara Reviewed-by: Shaun Tancheff Reviewed-by: Shuichi Ihara Reviewed-by: Oleg Drokin --- diff --git a/autoMakefile.am b/autoMakefile.am index 27dcf0f..a1d3b88 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -309,6 +309,101 @@ debs: undef.h debs_common if test "x@systemdsystemunitdir@" != "x"; then \ export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} systemd"; \ fi; \ + if test "x@ENABLE_PINGER@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} pinger"; \ + elif test "x@ENABLE_PINGER@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nopinger"; \ + fi; \ + if test "x@ENABLE_CHECKSUM@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} checksum"; \ + elif test "x@ENABLE_CHECKSUM@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nochecksum"; \ + fi; \ + if test "x@ENABLE_FLOCK@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} flock"; \ + elif test "x@ENABLE_FLOCK@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noflock"; \ + fi; \ + if test "x@ENABLE_HEALTH_WRITE@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} health_write"; \ + elif test "x@ENABLE_HEALTH_WRITE@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nohealth_write"; \ + fi; \ + if test "x@ENABLE_LRU_RESIZE@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} lru-resize"; \ + elif test "x@ENABLE_LRU_RESIZE@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolru-resize"; \ + fi; \ + if test "x@ENABLE_MINDF@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} mindf"; \ + elif test "x@ENABLE_MINDF@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nomindf"; \ + fi; \ + if test "x@ENABLE_FAIL_ALLOC@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} fail-alloc"; \ + elif test "x@ENABLE_FAIL_ALLOC@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nofail-alloc"; \ + fi; \ + if test "x@ENABLE_INVARIANTS@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} invariants"; \ + elif test "x@ENABLE_INVARIANTS@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noinvariants"; \ + fi; \ + if test "x@ENABLE_LU_REF@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} lu_ref"; \ + elif test "x@ENABLE_LU_REF@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolu_ref"; \ + fi; \ + if test "x@ENABLE_PGSTAT_TRACK@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} pgstate-track"; \ + elif test "x@ENABLE_PGSTAT_TRACK@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nopgstate-track"; \ + fi; \ + if test "x@ENABLE_LIBCFS_CDEBUG@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libcfs-cdebug"; \ + elif test "x@ENABLE_LIBCFS_CDEBUG@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibcfs-cdebug"; \ + fi; \ + if test "x@ENABLE_LIBCFS_TRACE@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libcfs-trace"; \ + elif test "x@ENABLE_LIBCFS_TRACE@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibcfs-trace"; \ + fi; \ + if test "x@ENABLE_LIBCFS_ASSERT@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libcfs-assert"; \ + elif test "x@ENABLE_LIBCFS_ASSERT@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibcfs-assert"; \ + fi; \ + if test "x@ENABLE_PANIC_DUMPLOG@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} panic_dumplog"; \ + elif test "x@ENABLE_PANIC_DUMPLOG@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nopanic_dumplog"; \ + fi; \ + if test "x@ENABLE_READLINE@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} readline"; \ + elif test "x@ENABLE_READLINE@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noreadline"; \ + fi; \ + if test "x@ENABLE_LIBPTHREAD@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} libpthread"; \ + elif test "x@ENABLE_LIBPTHREAD@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nolibpthread"; \ + fi; \ + if test "x@ENABLE_BACKOFF@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} backoff"; \ + elif test "x@ENABLE_BACKOFF@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nobackoff"; \ + fi; \ + if test "x@ENABLE_GNI@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} gni"; \ + elif test "x@ENABLE_GNI@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nogni"; \ + fi; \ + if test "x@ENABLE_EFENCE@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} efence"; \ + elif test "x@ENABLE_EFENCE@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} noefence"; \ + fi; \ export KERNEL_OBJ="$(LINUX_OBJ)"; \ export KERNEL_SRC="$(LINUX)"; \ echo "Enabled Build Profiles: $${DEB_BUILD_PROFILES}"; \ diff --git a/debian/rules b/debian/rules index 377c042..f3065dc 100755 --- a/debian/rules +++ b/debian/rules @@ -190,16 +190,18 @@ configure-stamp: autogen-stamp debian/control.main debian/control.modules.in if echo "$${DEB_BUILD_PROFILES}" | grep -q "o2ib"; then \ export EXTRAFLAGS="$${EXTRAFLAGS} --with-o2ib=$${O2IB_SRC}"; \ fi; \ - if echo "$${DEB_BUILD_PROFILES}" | grep -qw "gss"; then \ - export EXTRAFLAGS="$${EXTRAFLAGS} --enable-gss"; \ - elif echo "$${DEB_BUILD_PROFILES}" | grep -qw "nogss"; then \ - export EXTRAFLAGS="$${EXTRAFLAGS} --disable-gss"; \ - fi; \ - if echo "$${DEB_BUILD_PROFILES}" | grep -qw "crypto"; then \ - export EXTRAFLAGS="$${EXTRAFLAGS} --enable-crypto"; \ - elif echo "$${DEB_BUILD_PROFILES}" | grep -qw "nocrypto"; then \ - export EXTRAFLAGS="$${EXTRAFLAGS} --disable-crypto"; \ - fi; \ + options="gss crypto pinger checksum flock health_write lru-resize"; \ + options="$${options} mindf fail-alloc invariants lu_ref pgstate-track"; \ + options="$${options} libcfs-cdebug libcfs-trace libcfs-assert"; \ + options="$${options} panic_dumplog readline libpthread"; \ + options="$${options} backoff gni efence"; \ + for option in $${options}; do \ + if echo "$${DEB_BUILD_PROFILES}" | grep -qw "$${option}"; then \ + export EXTRAFLAGS="$${EXTRAFLAGS} --enable-$${option}"; \ + elif echo "$${DEB_BUILD_PROFILES}" | grep -qw "no$${option}"; then \ + export EXTRAFLAGS="$${EXTRAFLAGS} --disable-$${option}"; \ + fi; \ + done; \ if [ -f "$${CONFIG_CACHE_FILE}" ]; then \ export TMP_CACHE_FILE=$$(mktemp); \ sed -e "/ac_cv_env/d" \ @@ -491,11 +493,18 @@ kdist_config: prep-deb-files patch-stamp if echo "$${DEB_BUILD_PROFILES}" | grep -q "o2ib"; then \ export EXTRAFLAGS="$${EXTRAFLAGS} --with-o2ib=$${O2IB_SRC}"; \ fi; \ - if echo "$${DEB_BUILD_PROFILES}" | grep -qw "crypto"; then \ - export EXTRAFLAGS="$${EXTRAFLAGS} --enable-crypto"; \ - elif echo "$${DEB_BUILD_PROFILES}" | grep -qw "nocrypto"; then \ - export EXTRAFLAGS="$${EXTRAFLAGS} --disable-crypto"; \ - fi; \ + options="gss crypto pinger checksum flock health_write lru-resize"; \ + options="$${options} mindf fail-alloc invariants lu_ref pgstate-track"; \ + options="$${options} libcfs-cdebug libcfs-trace libcfs-assert"; \ + options="$${options} panic_dumplog readline libpthread"; \ + options="$${options} backoff gni efence"; \ + for option in $${options}; do \ + if echo "$${DEB_BUILD_PROFILES}" | grep -qw "$${option}"; then \ + export EXTRAFLAGS="$${EXTRAFLAGS} --enable-$${option}"; \ + elif echo "$${DEB_BUILD_PROFILES}" | grep -qw "no$${option}"; then \ + export EXTRAFLAGS="$${EXTRAFLAGS} --disable-$${option}"; \ + fi; \ + done; \ if [ -f "$${CONFIG_CACHE_FILE}" ]; then \ export TMP_CACHE_FILE=$$(mktemp --tmpdir newconfig-XXXXXXXX.cache); \ sed -e "/ac_cv_env/d" \ diff --git a/libcfs/autoconf/lustre-libcfs.m4 b/libcfs/autoconf/lustre-libcfs.m4 index 4d3dba8..5c201e0 100644 --- a/libcfs/autoconf/lustre-libcfs.m4 +++ b/libcfs/autoconf/lustre-libcfs.m4 @@ -10,8 +10,12 @@ AC_ARG_ENABLE([libcfs_cdebug], [disable libcfs CDEBUG, CWARN]), [], [enable_libcfs_cdebug="yes"]) AC_MSG_RESULT([$enable_libcfs_cdebug]) -AS_IF([test "x$enable_libcfs_cdebug" = xyes], - [AC_DEFINE(CDEBUG_ENABLED, 1, [enable libcfs CDEBUG, CWARN])]) +AS_IF([test "x$enable_libcfs_cdebug" = xyes], [ + AC_DEFINE(CDEBUG_ENABLED, 1, [enable libcfs CDEBUG, CWARN]) + AC_SUBST(ENABLE_LIBCFS_CDEBUG, yes) +], [ + AC_SUBST(ENABLE_LIBCFS_CDEBUG, no) +]) AC_MSG_CHECKING([whether to enable ENTRY/EXIT]) AC_ARG_ENABLE([libcfs_trace], @@ -19,8 +23,12 @@ AC_ARG_ENABLE([libcfs_trace], [disable libcfs ENTRY/EXIT]), [], [enable_libcfs_trace="yes"]) AC_MSG_RESULT([$enable_libcfs_trace]) -AS_IF([test "x$enable_libcfs_trace" = xyes], - [AC_DEFINE(CDEBUG_ENTRY_EXIT, 1, [enable libcfs ENTRY/EXIT])]) +AS_IF([test "x$enable_libcfs_trace" = xyes], [ + AC_DEFINE(CDEBUG_ENTRY_EXIT, 1, [enable libcfs ENTRY/EXIT]) + AC_SUBST(ENABLE_LIBCFS_TRACE, yes) +], [ + AC_SUBST(ENABLE_LIBCFS_TRACE, no) +]) AC_MSG_CHECKING([whether to enable LASSERT, LASSERTF]) AC_ARG_ENABLE([libcfs_assert], @@ -28,8 +36,12 @@ AC_ARG_ENABLE([libcfs_assert], [disable libcfs LASSERT, LASSERTF]), [], [enable_libcfs_assert="yes"]) AC_MSG_RESULT([$enable_libcfs_assert]) -AS_IF([test x$enable_libcfs_assert = xyes], - [AC_DEFINE(LIBCFS_DEBUG, 1, [enable libcfs LASSERT, LASSERTF])]) +AS_IF([test x$enable_libcfs_assert = xyes], [ + AC_DEFINE(LIBCFS_DEBUG, 1, [enable libcfs LASSERT, LASSERTF]) + AC_SUBST(ENABLE_LIBCFS_ASSERT, yes) +], [ + AC_SUBST(ENABLE_LIBCFS_ASSERT, no) +]) ]) # LIBCFS_CONFIG_CDEBUG # @@ -44,8 +56,12 @@ AC_ARG_ENABLE([panic_dumplog], [enable panic_dumplog]), [], [enable_panic_dumplog="no"]) AC_MSG_RESULT([$enable_panic_dumplog]) -AS_IF([test "x$enable_panic_dumplog" = xyes], - [AC_DEFINE(LNET_DUMP_ON_PANIC, 1, [use dumplog on panic])]) +AS_IF([test "x$enable_panic_dumplog" = xyes], [ + AC_DEFINE(LNET_DUMP_ON_PANIC, 1, [use dumplog on panic]) + AC_SUBST(ENABLE_PANIC_DUMPLOG, yes) +], [ + AC_SUBST(ENABLE_PANIC_DUMPLOG, no) +]) ]) # LIBCFS_CONFIG_PANIC_DUMPLOG # @@ -2685,6 +2701,10 @@ AS_IF([test "x$enable_readline" = xyes], [ AC_DEFINE(HAVE_LIBREADLINE, 1, [readline library is available]) ]) + + AC_SUBST(ENABLE_READLINE, yes) +], [ + AC_SUBST(ENABLE_READLINE, no) ]) AC_SUBST(LIBREADLINE) @@ -2702,7 +2722,10 @@ AS_IF([test "x$enable_libpthread" = xyes], [ AC_DEFINE([HAVE_LIBPTHREAD], 1, [use libpthread for libcfs library]) ]) + + AC_SUBST(ENABLE_LIBPTHREAD, yes) ], [ + AC_SUBST(ENABLE_LIBPTHREAD, no) AC_MSG_WARN([Using libpthread for libcfs library is disabled explicitly]) ]) AC_SUBST(PTHREAD_LIBS) diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index 625f797..a790561 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -20,6 +20,11 @@ AS_IF([test "x$enable_backoff" = xyes], [ ], [ AC_MSG_RESULT([no]) ]) + + AC_SUBST(ENABLE_BACKOFF, yes) +], [ + AC_SUBST(ENABLE_BACKOFF, no) + ]) ]) # LN_CONFIG_BACKOFF @@ -883,6 +888,10 @@ AS_IF([test "x$enable_gni" = xyes], [ GNICPPFLAGS="$GNICPPFLAGS -DGNILND_USE_RCA=1" ]) EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save" + + AC_SUBST(ENABLE_GNI, yes) +], [ + AC_SUBST(ENABLE_GNI, no) ]) AC_SUBST(GNICPPFLAGS) AC_SUBST(GNILND) @@ -1255,6 +1264,9 @@ AS_IF([test "$enable_efence" = yes], [ LIBEFENCE="-lefence" AC_DEFINE(HAVE_LIBEFENCE, 1, [libefence support is requested]) + AC_SUBST(ENABLE_EFENCE, yes) +], [ + AC_SUBST(ENABLE_EFENCE, no) ]) AC_SUBST(LIBEFENCE) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 358f102..3200c7a 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -140,8 +140,12 @@ AC_ARG_ENABLE([pinger], [disable recovery pinger support]), [], [enable_pinger="yes"]) AC_MSG_RESULT([$enable_pinger]) -AS_IF([test "x$enable_pinger" != xno], - [AC_DEFINE(CONFIG_LUSTRE_FS_PINGER, 1,[Use the Pinger])]) +AS_IF([test "x$enable_pinger" != xno], [ + AC_DEFINE(CONFIG_LUSTRE_FS_PINGER, 1, [Use the Pinger]) + AC_SUBST(ENABLE_PINGER, yes) +], [ + AC_SUBST(ENABLE_PINGER, no) +]) ]) # LC_CONFIG_PINGER # @@ -156,8 +160,12 @@ AC_ARG_ENABLE([checksum], [disable data checksum support]), [], [enable_checksum="yes"]) AC_MSG_RESULT([$enable_checksum]) -AS_IF([test "x$enable_checksum" != xno], - [AC_DEFINE(ENABLE_CHECKSUM, 1, [do data checksums])]) +AS_IF([test "x$enable_checksum" != xno], [ + AC_DEFINE(CONFIG_ENABLE_CHECKSUM, 1, [do data checksums]) + AC_SUBST(ENABLE_CHECKSUM, yes) +], [ + AC_SUBST(ENABLE_CHECKSUM, no) +]) ]) # LC_CONFIG_CHECKSUM # @@ -172,8 +180,12 @@ AC_ARG_ENABLE([flock], [disable flock by default]), [], [enable_flock="yes"]) AC_MSG_RESULT([$enable_flock]) -AS_IF([test "x$enable_flock" != xno], - [AC_DEFINE(ENABLE_FLOCK, 1, [enable flock by default])]) +AS_IF([test "x$enable_flock" != xno], [ + AC_DEFINE(CONFIG_ENABLE_FLOCK, 1, [enable flock by default]) + AC_SUBST(ENABLE_FLOCK, yes) +], [ + AC_SUBST(ENABLE_FLOCK, no) +]) ]) # LC_CONFIG_FLOCK # @@ -188,8 +200,12 @@ AC_ARG_ENABLE([health_write], [enable disk writes when doing health check]), [], [enable_health_write="no"]) AC_MSG_RESULT([$enable_health_write]) -AS_IF([test "x$enable_health_write" != xno], - [AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, [Write when Checking Health])]) +AS_IF([test "x$enable_health_write" != xno], [ + AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, [Write when Checking Health]) + AC_SUBST(ENABLE_HEALTH_WRITE, yes) +], [ + AC_SUBST(ENABLE_HEALTH_WRITE, no) +]) ]) # LC_CONFIG_HEALTH_CHECK_WRITE # @@ -202,8 +218,12 @@ AC_ARG_ENABLE([lru_resize], [enable lru resize support]), [], [enable_lru_resize="yes"]) AC_MSG_RESULT([$enable_lru_resize]) -AS_IF([test "x$enable_lru_resize" != xno], - [AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])]) +AS_IF([test "x$enable_lru_resize" != xno], [ + AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support]) + AC_SUBST(ENABLE_LRU_RESIZE, yes) +], [ + AC_SUBST(ENABLE_LRU_RESIZE, no) +]) ]) # LC_CONFIG_LRU_RESIZE # @@ -4497,8 +4517,12 @@ AC_ARG_ENABLE([mindf], [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]), [], [enable_mindf="no"]) AC_MSG_RESULT([$enable_mindf]) -AS_IF([test "$enable_mindf" = "yes"], - [AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])]) +AS_IF([test "$enable_mindf" = "yes"], [ + AC_DEFINE([MIN_DF], 1, [Report minimum OST free space]) + AC_SUBST(ENABLE_MINDF, yes) +], [ + AC_SUBST(ENABLE_MINDF, no) +]) AC_MSG_CHECKING([whether to randomly failing memory alloc]) AC_ARG_ENABLE([fail_alloc], @@ -4506,9 +4530,12 @@ AC_ARG_ENABLE([fail_alloc], [disable randomly alloc failure]), [], [enable_fail_alloc="yes"]) AC_MSG_RESULT([$enable_fail_alloc]) -AS_IF([test "x$enable_fail_alloc" != xno], - [AC_DEFINE([RANDOM_FAIL_ALLOC], 1, - [enable randomly alloc failure])]) +AS_IF([test "x$enable_fail_alloc" != xno], [ + AC_DEFINE([RANDOM_FAIL_ALLOC], 1, [enable randomly alloc failure]) + AC_SUBST(ENABLE_FAIL_ALLOC, yes) +], [ + AC_SUBST(ENABLE_FAIL_ALLOC, no) +]) AC_MSG_CHECKING([whether to check invariants (expensive cpu-wise)]) AC_ARG_ENABLE([invariants], @@ -4516,9 +4543,13 @@ AC_ARG_ENABLE([invariants], [enable invariant checking (cpu intensive)]), [], [enable_invariants="no"]) AC_MSG_RESULT([$enable_invariants]) -AS_IF([test "x$enable_invariants" = xyes], - [AC_DEFINE([CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK], 1, - [enable invariant checking])]) +AS_IF([test "x$enable_invariants" = xyes], [ + AC_DEFINE([CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK], 1, + [enable invariant checking]) + AC_SUBST(ENABLE_INVARIANTS, yes) +], [ + AC_SUBST(ENABLE_INVARIANTS, no) +]) AC_MSG_CHECKING([whether to track references with lu_ref]) AC_ARG_ENABLE([lu_ref], @@ -4526,9 +4557,13 @@ AC_ARG_ENABLE([lu_ref], [enable lu_ref reference tracking code]), [], [enable_lu_ref="no"]) AC_MSG_RESULT([$enable_lu_ref]) -AS_IF([test "x$enable_lu_ref" = xyes], - [AC_DEFINE([CONFIG_LUSTRE_DEBUG_LU_REF], 1, - [enable lu_ref reference tracking code])]) +AS_IF([test "x$enable_lu_ref" = xyes], [ + AC_DEFINE([CONFIG_LUSTRE_DEBUG_LU_REF], 1, + [enable lu_ref reference tracking code]) + AC_SUBST(ENABLE_LU_REF, yes) +], [ + AC_SUBST(ENABLE_LU_REF, no) +]) AC_MSG_CHECKING([whether to enable page state tracking]) AC_ARG_ENABLE([pgstate-track], @@ -4536,9 +4571,13 @@ AC_ARG_ENABLE([pgstate-track], [enable page state tracking]), [], [enable_pgstat_track="no"]) AC_MSG_RESULT([$enable_pgstat_track]) -AS_IF([test "x$enable_pgstat_track" = xyes], - [AC_DEFINE([CONFIG_DEBUG_PAGESTATE_TRACKING], 1, - [enable page state tracking code])]) +AS_IF([test "x$enable_pgstat_track" = xyes], [ + AC_DEFINE([CONFIG_DEBUG_PAGESTATE_TRACKING], 1, + [enable page state tracking code]) + AC_SUBST(ENABLE_PGSTAT_TRACK, yes) +], [ + AC_SUBST(ENABLE_PGSTAT_TRACK, no) +]) PKG_PROG_PKG_CONFIG AC_MSG_CHECKING([systemd unit file directory]) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 9e6e493..995073d 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -444,7 +444,7 @@ int client_obd_setup(struct obd_device *obd, struct lustre_cfg *lcfg) cli->cl_supp_cksum_types = OBD_CKSUM_CRC32; cli->cl_preferred_cksum_type = 0; -#ifdef ENABLE_CHECKSUM +#ifdef CONFIG_ENABLE_CHECKSUM /* Turn on checksumming by default. */ cli->cl_checksum = 1; /* diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 652b215..2054fc0 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -165,10 +165,10 @@ static struct ll_sb_info *ll_init_sbi(struct lustre_sb_info *lsi) atomic_set(&sbi->ll_ra_info.ra_async_inflight, 0); set_bit(LL_SBI_VERBOSE, sbi->ll_flags); -#ifdef ENABLE_CHECKSUM +#ifdef CONFIG_ENABLE_CHECKSUM set_bit(LL_SBI_CHECKSUM, sbi->ll_flags); #endif -#ifdef ENABLE_FLOCK +#ifdef CONFIG_ENABLE_FLOCK set_bit(LL_SBI_FLOCK, sbi->ll_flags); #endif