From: deshmukh Date: Tue, 1 Dec 2009 12:57:45 +0000 (+0000) Subject: b=20655 X-Git-Tag: GIT_EPOCH_B_HD_KDMU~45 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=94d4792f303c7ecaf81ee037579c27cacc1eb717;hp=d721e68a4f81dd3e74084eae4d2a32bdacffb40b b=20655 i=robert.read i=sheng.yang With this patch, ldiskfs will be ext4 by default on HEAD for RHEL5. To disable ext4 i.e. to build ext3 ldiskfs --disable-ext4 configure option needs to be given. There is no change for b1_8. --- diff --git a/build/autoconf/lustre-build.m4 b/build/autoconf/lustre-build.m4 index 610519f..b85f5d5 100644 --- a/build/autoconf/lustre-build.m4 +++ b/build/autoconf/lustre-build.m4 @@ -246,6 +246,46 @@ fi AC_CONFIG_SUBDIRS(ldiskfs) ]) +AC_DEFUN([LC_KERNEL_WITH_EXT4], +[if test -f $LINUX/fs/ext4/ext4.h ; then +$1 +else +$2 +fi +]) + +# +# LB_HAVE_EXT4_ENABLED +# +AC_DEFUN([LB_HAVE_EXT4_ENABLED], +[ +if test x$RHEL_KERNEL = xyes; then + AC_ARG_ENABLE([ext4], + AC_HELP_STRING([--enable-ext4], + [enable building of ldiskfs based on ext4]), + [], + [ + if test x$ldiskfs_is_ext4 = xyes; then + enable_ext4=yes + else + enable_ext4=no + fi + ]) +else + case $LINUXRELEASE in + # ext4 was in 2.6.22-2.6.26 but not stable enough to use + 2.6.2[0-6]*) enable_ext4='no' ;; + *) LC_KERNEL_WITH_EXT4([enable_ext4='yes'], + [enable_ext4='no']) ;; + esac +fi +if test x$enable_ext4 = xyes; then + ac_configure_args="$ac_configure_args --enable-ext4" +fi +AC_MSG_CHECKING([whether to build ldiskfs based on ext4]) +AC_MSG_RESULT([$enable_ext4]) +]) + # Define no libcfs by default. AC_DEFUN([LB_LIBCFS_DIR], [ @@ -873,8 +913,8 @@ LN_CONFIG_CDEBUG LC_QUOTA LB_CONFIG_MODULES - LN_CONFIG_USERSPACE +LB_HAVE_EXT4_ENABLED LB_PATH_DMU LB_PATH_LIBSYSIO diff --git a/ldiskfs/configure.ac b/ldiskfs/configure.ac index 70a5d22..6644fe5 100644 --- a/ldiskfs/configure.ac +++ b/ldiskfs/configure.ac @@ -33,13 +33,6 @@ $2 esac ]) -AC_DEFUN([LC_KERNEL_WITH_EXT4], -[if test -f $LINUX/fs/ext4/ext4.h ; then -$1 -else -$2 -fi -]) AC_MSG_CHECKING([whether to build kernel modules]) AC_ARG_ENABLE([modules], @@ -90,22 +83,6 @@ AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno) LB_DEFINE_LDISKFS_OPTIONS -AC_MSG_CHECKING([whether to build ldiskfs based on ext4]) -if test x$RHEL_KERNEL = xyes; then - AC_ARG_ENABLE([ext4], - AC_HELP_STRING([--enable-ext4], - [enable building of ldiskfs based on ext4]), - [], [enable_ext4='no']) -else - case $LINUXRELEASE in - # ext4 was in 2.6.22-2.6.26 but not stable enough to use - 2.6.2[0-6]*) enable_ext4='no' ;; - *) LC_KERNEL_WITH_EXT4([enable_ext4='yes'], - [enable_ext4='no']) ;; - esac -fi -AC_MSG_RESULT([$enable_ext4]) - if test x$enable_ext4 = xyes ; then AC_DEFINE(HAVE_EXT4_LDISKFS, 1, [ldiskfs based on ext4]) BACKFS=ext4 diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index edca74d..11e6569 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -8,6 +8,7 @@ AC_DEFUN([LC_CONFIG_SRCDIR], [AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c]) libcfs_is_module=yes +ldiskfs_is_ext4=yes ]) #