From 8d2a096f1b53afd5f5083264daa76c06e5f3056a Mon Sep 17 00:00:00 2001 From: scjody Date: Tue, 12 Jun 2007 21:58:46 +0000 Subject: [PATCH] Branch b1_6 Move ldiskfs to its own package and CVS module. b=12068 i=mjmac i=brian --- lustre/Makefile.in | 2 - lustre/autoMakefile.am | 10 +---- lustre/autoconf/lustre-core.m4 | 87 +++++++++--------------------------------- lustre/lvfs/Makefile.in | 4 +- lustre/lvfs/autoMakefile.am | 20 ---------- lustre/tests/test-framework.sh | 3 +- lustre/utils/module_setup.sh | 3 +- 7 files changed, 21 insertions(+), 108 deletions(-) diff --git a/lustre/Makefile.in b/lustre/Makefile.in index cca2b21..c06794a 100644 --- a/lustre/Makefile.in +++ b/lustre/Makefile.in @@ -1,5 +1,3 @@ -@LDISKFS_TRUE@subdir-m += ldiskfs ldiskfs2 - subdir-m += lvfs subdir-m += obdclass subdir-m += lov diff --git a/lustre/autoMakefile.am b/lustre/autoMakefile.am index b2097ea..3e6e59b 100644 --- a/lustre/autoMakefile.am +++ b/lustre/autoMakefile.am @@ -9,7 +9,7 @@ AUTOMAKE_OPTIONS = foreign ALWAYS_SUBDIRS := include lvfs obdclass ldlm ptlrpc osc lov obdecho \ mgc doc utils tests scripts autoconf contrib -SERVER_SUBDIRS := ldiskfs ldiskfs2 obdfilter ost mds mgs +SERVER_SUBDIRS := obdfilter ost mds mgs CLIENT_SUBDIRS := mdc llite @@ -44,14 +44,6 @@ DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS) \ EXTRA_DIST = BUGS FDL kernel_patches -if LDISKFS -LDISKFS = ldiskfs-sources ldiskfs2-sources -ldiskfs-sources: - $(MAKE) sources -C ldiskfs -ldiskfs2-sources: - $(MAKE) sources -C ldiskfs2 -endif - lvfs-sources: $(MAKE) sources -C lvfs obdclass-sources: diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index fed2b04..965460a 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -304,82 +304,34 @@ kernel patches from Lustre version 1.4.3 or above.]) # # LC_CONFIG_BACKINGFS # -# whether to use ldiskfs instead of ext3 +# setup, check the backing filesystem # AC_DEFUN([LC_CONFIG_BACKINGFS], [ -BACKINGFS='ext3' +BACKINGFS="ldiskfs" -# 2.6 gets ldiskfs -AC_MSG_CHECKING([whether to enable ldiskfs]) -AC_ARG_ENABLE([ldiskfs], - AC_HELP_STRING([--enable-ldiskfs], - [use ldiskfs for the Lustre backing FS]), - [],[enable_ldiskfs="$linux25"]) -AC_MSG_RESULT([$enable_ldiskfs]) +if test x$with_ldiskfs = xno ; then + BACKINGFS="ext3" -if test x$enable_ldiskfs = xyes ; then - BACKINGFS="ldiskfs" - - AC_MSG_CHECKING([whether to enable quilt for making ldiskfs]) - AC_ARG_ENABLE([quilt], - AC_HELP_STRING([--disable-quilt],[disable use of quilt for ldiskfs]), - [],[enable_quilt='yes']) - AC_MSG_RESULT([$enable_quilt]) - - AC_PATH_PROG(PATCH, patch, [no]) - - if test x$enable_quilt = xno ; then - QUILT="no" - else - AC_PATH_PROG(QUILT, quilt, [no]) + if test x$linux25$enable_server = xyesyes ; then + AC_MSG_ERROR([ldiskfs is required for 2.6-based servers.]) fi - if test x$enable_ldiskfs$PATCH$QUILT = xyesnono ; then - AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module (for Linux 2.6)]) - fi - - AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module]) - AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs]) - AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls for ldiskfs]) - AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security for ldiskfs]) - - AC_DEFINE(CONFIG_LDISKFS2_FS_XATTR, 1, [enable extended attributes for ldiskfs2]) - AC_DEFINE(CONFIG_LDISKFS2_FS_POSIX_ACL, 1, [enable posix acls for ldiskfs2]) - AC_DEFINE(CONFIG_LDISKFS2_FS_SECURITY, 1, [enable fs security for ldiskfs2]) -fi + # --- Check that ext3 and ext3 xattr are enabled in the kernel + LC_CONFIG_EXT3([],[ + AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel]) + ],[ + AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel]) + AC_MSG_WARN([This build may fail.]) + ]) +else + # ldiskfs is enabled + LB_DEFINE_LDISKFS_OPTIONS +fi #ldiskfs AC_MSG_CHECKING([which backing filesystem to use]) AC_MSG_RESULT([$BACKINGFS]) AC_SUBST(BACKINGFS) - -case $BACKINGFS in - ext3) - # --- Check that ext3 and ext3 xattr are enabled in the kernel - LC_CONFIG_EXT3([],[ - AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel]) - ],[ - AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel]) - AC_MSG_WARN([This build may fail.]) - ]) - ;; - ldiskfs) - AC_MSG_CHECKING([which ldiskfs series to use]) - case $LINUXRELEASE in - 2.6.5*) LDISKFS_SERIES="2.6-suse.series" ;; - 2.6.9*) LDISKFS_SERIES="2.6-rhel4.series" ;; - 2.6.10-ac*) LDISKFS_SERIES="2.6-fc3.series" ;; - 2.6.10*) LDISKFS_SERIES="2.6-rhel4.series" ;; - 2.6.12*) LDISKFS_SERIES="2.6.12-vanilla.series" ;; - 2.6.15*) LDISKFS_SERIES="2.6-fc5.series";; - 2.6.16*) LDISKFS_SERIES="2.6-sles10.series";; - 2.6.18*) LDISKFS_SERIES="2.6.18-vanilla.series";; - *) AC_MSG_WARN([Unknown kernel version $LINUXRELEASE, fix lustre/autoconf/lustre-core.m4]) - esac - AC_MSG_RESULT([$LDISKFS_SERIES]) - AC_SUBST(LDISKFS_SERIES) - ;; -esac # $BACKINGFS ]) # @@ -1315,7 +1267,6 @@ fi # AC_DEFUN([LC_CONDITIONALS], [AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes) -AM_CONDITIONAL(LDISKFS, test x$enable_ldiskfs = xyes) AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno) AM_CONDITIONAL(LIBLUSTRE_TESTS, test x$enable_liblustre_tests = xyes) AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests) @@ -1354,10 +1305,6 @@ lustre/kernel_patches/targets/rh-2.4.target lustre/kernel_patches/targets/rhel-2.4.target lustre/kernel_patches/targets/suse-2.4.21-2.target lustre/kernel_patches/targets/sles-2.4.target -lustre/ldiskfs/Makefile -lustre/ldiskfs/autoMakefile -lustre/ldiskfs2/Makefile -lustre/ldiskfs2/autoMakefile lustre/ldlm/Makefile lustre/liblustre/Makefile lustre/liblustre/tests/Makefile diff --git a/lustre/lvfs/Makefile.in b/lustre/lvfs/Makefile.in index 6a8feb5..afa2511 100644 --- a/lustre/lvfs/Makefile.in +++ b/lustre/lvfs/Makefile.in @@ -1,6 +1,5 @@ MODULES := lvfs @SERVER_TRUE@MODULES += fsfilt_@BACKINGFS@ -@LDISKFS_TRUE@MODULES += fsfilt_ldiskfs2 @QUOTA_TRUE@MODULES += quotafmt_test lvfs-objs := lvfs_common.o lvfs_linux.o fsfilt.o upcall_cache.o @@ -10,13 +9,12 @@ lvfs-objs := lvfs_common.o lvfs_linux.o fsfilt.o upcall_cache.o ifeq ($(PATCHLEVEL),6) fsfilt_@BACKINGFS@-objs := fsfilt-@BACKINGFS@.o -fsfilt_ldiskfs2-objs := fsfilt-ldiskfs2.o $(obj)/fsfilt-%.c: $(obj)/fsfilt_%.c ln -s $< $@ endif # for on 2.6 -EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LUSTRE@ -I@LUSTRE@/ldiskfs -I@LUSTRE@/ldiskfs2 +EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LDISKFS_DIR@ -I@LDISKFS_DIR@/ldiskfs @INCLUDE_RULES@ diff --git a/lustre/lvfs/autoMakefile.am b/lustre/lvfs/autoMakefile.am index 77faaf2..644e10a 100644 --- a/lustre/lvfs/autoMakefile.am +++ b/lustre/lvfs/autoMakefile.am @@ -22,19 +22,9 @@ modulefs_DATA := lvfs$(KMODEXT) if SERVER modulefs_DATA += fsfilt_$(BACKINGFS)$(KMODEXT) -if LDISKFS - -modulefs_DATA += fsfilt_ldiskfs2$(KMODEXT) -sources: fsfilt_$(BACKINGFS).c fsfilt_ldiskfs2.c - touch sources - -else #LDISKFS - sources: fsfilt_$(BACKINGFS).c touch sources -endif #LDISKFS - else #SERVER sources: @@ -51,18 +41,8 @@ ldiskfs_sed_flags = \ -e "s/rsv_window_add/ext3_rsv_window_add/g" \ -e "s/EXT3/LDISKFS/g" -e "s/ext3/ldiskfs/g" -ldiskfs2_sed_flags = \ - -e "s/dx_hash_info/ext3_dx_hash_info/g" \ - -e "s/dir_private_info/ext3_dir_private_info/g" \ - -e "s/DX_HASH/EXT3_DX_HASH/g" \ - -e "s/reserve_window/ext3_reserve_window/g" \ - -e "s/rsv_window_add/ext3_rsv_window_add/g" \ - -e "s/EXT3/LDISKFS2/g" -e "s/ext3/ldiskfs2/g" - fsfilt_ldiskfs.c: fsfilt_ext3.c sed $(strip $(ldiskfs_sed_flags)) $< > $@ -fsfilt_ldiskfs2.c: fsfilt_ext3.c - sed $(strip $(ldiskfs2_sed_flags)) $< > $@ fsfilt_ldiskfs_quota.h: fsfilt_ext3_quota.h sed $(strip $(ldiskfs_sed_flags)) $< > $@ diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 5c81bc0..2deb6d3 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -120,8 +120,7 @@ load_modules() { load_module osc/osc load_module lov/lov load_module mds/mds - [ "$FSTYPE" = "ldiskfs" ] && load_module ldiskfs/ldiskfs - [ "$FSTYPE" = "ldiskfs2" ] && load_module ldiskfs/ldiskfs2 + [ "$FSTYPE" = "ldiskfs" ] && load_module ../ldiskfs/ldiskfs/ldiskfs load_module lvfs/fsfilt_$FSTYPE load_module ost/ost load_module obdfilter/obdfilter diff --git a/lustre/utils/module_setup.sh b/lustre/utils/module_setup.sh index 2aa2f59..bd53892 100755 --- a/lustre/utils/module_setup.sh +++ b/lustre/utils/module_setup.sh @@ -31,8 +31,7 @@ cp -u ../osc/osc.$EXT $MDIR cp -u ../lov/lov.$EXT $MDIR cp -u ../mds/mds.$EXT $MDIR cp -u ../lvfs/$FSFLT.$EXT $MDIR -[ $KVER == "26" ] && cp -u ../ldiskfs/ldiskfs.$EXT $MDIR -[ $KVER == "26" ] && cp -u ../ldiskfs2/ldiskfs2.$EXT $MDIR +[ $KVER == "26" ] && cp -u ../../ldiskfs/ldiskfs/ldiskfs.$EXT $MDIR cp -u ../ost/ost.$EXT $MDIR cp -u ../obdfilter/obdfilter.$EXT $MDIR cp -u ../llite/lustre.$EXT $MDIR -- 1.8.3.1