From 040033cef24c5aca2967daf2da7a862abcd074cf Mon Sep 17 00:00:00 2001 From: pschwan Date: Sun, 2 Mar 2003 05:23:24 +0000 Subject: [PATCH] land 0.5.20.3 b_devel onto HEAD (b_devel will remain) --- lustre/ChangeLog | 27 +- lustre/Makefile.am | 16 +- lustre/Rules | 1 + lustre/archdep.m4 | 34 +- lustre/autogen.sh | 2 +- lustre/cobd/cache_obd.c | 4 + lustre/cobd/lproc_cache.c | 16 +- lustre/conf/lustre.dtd | 50 +- lustre/conf/lustre2ldif.xsl | 29 +- lustre/conf/top.ldif | 2 +- lustre/configure.in | 51 +- lustre/extN/Makefile.am | 31 +- lustre/extN/ext3-2.4-ino_t.diff | 138 ++++ lustre/extN/ext3-2.4.18-ino_sb_macro.diff | 14 +- lustre/extN/ext3-largefile.diff | 23 + lustre/extN/extN-san.diff | 88 +++ lustre/include/liblustre.h | 431 +++++++++++ lustre/include/linux/lprocfs_status.h | 11 +- lustre/include/linux/lustre_dlm.h | 21 +- lustre/include/linux/lustre_export.h | 9 - lustre/include/linux/lustre_fsfilt.h | 13 + lustre/include/linux/lustre_handles.h | 39 + lustre/include/linux/lustre_idl.h | 57 +- lustre/include/linux/lustre_import.h | 9 +- lustre/include/linux/lustre_lib.h | 72 +- lustre/include/linux/lustre_lite.h | 12 +- lustre/include/linux/lustre_mds.h | 41 +- lustre/include/linux/lustre_net.h | 101 ++- lustre/include/linux/obd.h | 62 +- lustre/include/linux/obd_class.h | 116 ++- lustre/include/linux/obd_filter.h | 23 +- lustre/include/linux/obd_lov.h | 3 - lustre/include/linux/obd_ost.h | 2 + lustre/include/linux/obd_support.h | 32 +- .../kernel_patches/patches/iod-rmap-exports.patch | 45 +- lustre/kernel_patches/patches/lustre-2.5.patch | 371 +++++----- lustre/kernel_patches/patches/lustre_version.patch | 4 +- .../patches/vfs_intent-2.4.18-18.patch | 678 ++++++++++++----- lustre/kernel_patches/patches/vfs_intent_hp.patch | 587 ++++++++++----- lustre/kernel_patches/pc/lustre-2.5.pc | 11 + lustre/kernel_patches/pc/vfs_intent-2.4.18-18.pc | 1 + lustre/kernel_patches/series/vanilla-2.5 | 2 + lustre/kernel_patches/which_patch | 2 + lustre/ldlm/Makefile.am | 13 +- lustre/ldlm/l_lock.c | 8 +- lustre/ldlm/ldlm_extent.c | 35 +- lustre/ldlm/ldlm_lock.c | 69 +- lustre/ldlm/ldlm_lockd.c | 97 +-- lustre/ldlm/ldlm_request.c | 68 +- lustre/ldlm/ldlm_resource.c | 26 +- lustre/lib/client.c | 150 +++- lustre/lib/mds_updates.c | 52 +- lustre/lib/obd_pack.c | 3 + lustre/lib/simple.c | 47 +- lustre/lib/target.c | 279 ++++++- lustre/liblustre/.cvsignore | 9 + lustre/liblustre/Makefile.am | 18 + lustre/liblustre/libtest.c | 114 +++ lustre/llite/commit_callback.c | 4 + lustre/llite/dcache.c | 13 +- lustre/llite/dir.c | 12 +- lustre/llite/file.c | 123 +++- lustre/llite/lproc_llite.c | 58 +- lustre/llite/namei.c | 65 +- lustre/llite/rw.c | 104 ++- lustre/llite/super.c | 59 +- lustre/llite/super25.c | 58 +- lustre/llite/symlink.c | 42 ++ lustre/llite/sysctl.c | 3 + lustre/lov/Makefile.am | 8 +- lustre/lov/lov_obd.c | 158 ++-- lustre/lov/lov_pack.c | 14 +- lustre/lov/lproc_lov.c | 41 +- lustre/mdc/lproc_mdc.c | 4 + lustre/mdc/mdc_reint.c | 23 +- lustre/mdc/mdc_request.c | 45 +- lustre/mds/handler.c | 699 +++++++++--------- lustre/mds/lproc_mds.c | 12 +- lustre/mds/mds_fs.c | 44 +- lustre/mds/mds_lov.c | 2 + lustre/mds/mds_open.c | 279 +++++-- lustre/mds/mds_reint.c | 771 ++++++++++++++------ lustre/obdclass/Makefile.am | 17 +- lustre/obdclass/class_obd.c | 135 +++- lustre/obdclass/debug.c | 5 + lustre/obdclass/fsfilt_ext3.c | 23 +- lustre/obdclass/fsfilt_extN.c | 19 +- lustre/obdclass/fsfilt_reiserfs.c | 5 + lustre/obdclass/genops.c | 25 +- lustre/obdclass/lprocfs_status.c | 63 +- lustre/obdclass/lustre_handles.c | 166 +++++ lustre/obdclass/lustre_peer.c | 179 +++++ lustre/obdclass/statfs_pack.c | 10 + lustre/obdclass/sysctl.c | 3 + lustre/obdclass/uuid.c | 8 +- lustre/obdecho/Makefile.am | 7 +- lustre/obdecho/echo.c | 68 +- lustre/obdecho/echo_client.c | 165 +++-- lustre/obdecho/lproc_echo.c | 5 +- lustre/obdfilter/Makefile.am | 2 +- lustre/obdfilter/filter.c | 805 ++++++++++++++------- lustre/obdfilter/lproc_obdfilter.c | 6 + lustre/osc/Makefile.am | 8 +- lustre/osc/lproc_osc.c | 4 + lustre/osc/osc_request.c | 775 +++++++++++++++++--- lustre/ost/ost_handler.c | 303 ++++++-- lustre/ptlbd/client.c | 3 - lustre/ptlbd/rpc.c | 5 +- lustre/ptlbd/server.c | 3 +- lustre/ptlrpc/Makefile.am | 5 + lustre/ptlrpc/client.c | 102 ++- lustre/ptlrpc/connection.c | 42 +- lustre/ptlrpc/events.c | 222 ++++-- lustre/ptlrpc/niobuf.c | 133 ++-- lustre/ptlrpc/pack_generic.c | 3 + lustre/ptlrpc/recovd.c | 21 +- lustre/ptlrpc/recover.c | 15 +- lustre/ptlrpc/rpc.c | 38 +- lustre/ptlrpc/service.c | 249 ++++--- lustre/scripts/lustre.spec.in | 42 +- lustre/tests/.cvsignore | 2 + lustre/tests/Makefile.am | 8 +- lustre/tests/acceptance-metadata-double.sh | 140 ++++ lustre/tests/acceptance-metadata-single.sh | 64 +- lustre/tests/acceptance-small.sh | 35 +- lustre/tests/ba-echo.sh | 12 +- lustre/tests/ba-mount.sh | 12 +- lustre/tests/compile.sh | 15 + lustre/tests/directio.c | 49 +- lustre/tests/lkcdmap | 12 +- lustre/tests/llmount.sh | 6 +- lustre/tests/local.sh | 5 +- lustre/tests/mcr-individual-ost-nogw-config.sh | 2 +- lustre/tests/mcr-mds-failover-config.sh | 18 +- lustre/tests/mcr-routed-config.sh | 10 +- lustre/tests/mcr.sh | 6 +- lustre/tests/mcrlov.sh | 6 +- lustre/tests/mlink.c | 25 + lustre/tests/mount2.sh | 21 +- lustre/tests/open_delay.c | 2 + lustre/tests/recovery-cleanup.sh | 134 ++++ lustre/tests/recovery-small.sh | 50 +- lustre/tests/runiozone | 10 +- lustre/tests/runtests | 52 +- lustre/tests/sanity.sh | 153 ++-- lustre/tests/statmany.c | 1 + lustre/tests/statone.c | 60 ++ lustre/tests/tchmod.c | 3 +- lustre/tests/testreq.c | 1 + lustre/tests/uml.sh | 4 +- lustre/tests/wantedi.c | 3 +- lustre/utils/.cvsignore | 1 + lustre/utils/Makefile.am | 8 +- lustre/utils/lconf.in | 647 +++++++++++------ lustre/utils/lctl.c | 12 +- lustre/utils/lfind.c | 4 + lustre/utils/lmc | 73 +- lustre/utils/obd.c | 427 ++++++----- lustre/utils/obdbarrier.c | 1 + lustre/utils/obdctl.h | 5 +- lustre/utils/obdio.c | 1 + lustre/utils/obdiolib.c | 1 + lustre/utils/obdstat.c | 1 + 163 files changed, 9276 insertions(+), 3425 deletions(-) create mode 100644 lustre/extN/ext3-2.4-ino_t.diff create mode 100644 lustre/extN/ext3-largefile.diff create mode 100644 lustre/extN/extN-san.diff create mode 100644 lustre/include/liblustre.h create mode 100644 lustre/include/linux/lustre_handles.h create mode 100644 lustre/kernel_patches/pc/lustre-2.5.pc create mode 100644 lustre/kernel_patches/series/vanilla-2.5 create mode 100644 lustre/liblustre/.cvsignore create mode 100644 lustre/liblustre/Makefile.am create mode 100644 lustre/liblustre/libtest.c create mode 100644 lustre/obdclass/lustre_handles.c create mode 100644 lustre/obdclass/lustre_peer.c create mode 100644 lustre/tests/acceptance-metadata-double.sh create mode 100644 lustre/tests/compile.sh create mode 100755 lustre/tests/mlink.c create mode 100755 lustre/tests/recovery-cleanup.sh create mode 100644 lustre/tests/statone.c diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 05209b5..61193c7 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -1,8 +1,25 @@ TBD - * version v0_5_21 - * bug fixes - - workaround for gcc 3.2, which has macro-argument issues (850) - - lmc/lconf syntax change for OST UUIDs + * version v0_5_21 + * bug fixes + - LDLM_DEBUG macro fix, for gcc 3.2 (850) + - failed open()s could cause deadlock; fixed (867, 869) + - stop cancelling OST locks when files are closed (481) + - overlapping XID spaces caused network corruption (851, 853) + - fix unsafe fsfilt counter arithmetic; change to atomic_t + - setattr_raw added, to do single-RPC, server-side setattrs + - lmc/lconf syntax change for OST UUIDs + - fix crashy race condition between ptlrpc_free_req and osc_close + - don't use request in mdc_enqueue if we hit a timeout (889) + - don't set the inode i_size for regular files from the MDS (896) + - handle out of order completion AST (842) + - don't LBUG if a lock request times out after receiving AST (913) + - avoid d_rehash race in ll_find_alias by rehashing inside dcache_lock + - if a bad lock AST arrives, send an error instead of dropping entirely + - return 0 from revalidate2 if ll_intent_lock returns -EINTR (912) + - fix leak in bulk IO when only partially completed (899, 900, 926) + * protocol changes + - READPAGE and SETATTRs which don't take server-side locks get + their own portal 2003-02-11 Phil Schwan * version v0_5_20 @@ -31,7 +48,7 @@ TBD - client verifies file size before zeroing page past EOF (445) - OST now writes last allocated objid to disk with allocation (108) - LOV on echo now works (409) - * protocol changes + * protocol changes - mds_reint_unlink sends a new buffer, with the EA included. this buffer is only valid if body->valid & OBD_MD_FLEASIZE, which is only set if a regular file was being unlinked, and it was the last link diff --git a/lustre/Makefile.am b/lustre/Makefile.am index 3edac96..f16f126 100644 --- a/lustre/Makefile.am +++ b/lustre/Makefile.am @@ -6,14 +6,20 @@ AUTOMAKE_OPTIONS = foreign if LINUX25 -DIRS24 = mds +DIRS24 = else -DIRS24 = extN mds +DIRS24 = extN ptlbd endif -# NOTE: keep extN before mds and obdfilter -SUBDIRS = $(DIRS24) obdclass utils ptlrpc ldlm lib obdfilter mdc osc ost llite -SUBDIRS+= obdecho lov cobd ptlbd tests doc scripts conf +if LIBLUSTRE +SUBDIRS = lov obdclass ptlrpc obdecho ldlm osc liblustre utils +else +# NOTE: keep extN before obdclass, mds, and obdfilter. Keep obdclass as early +# as possible, to have the best chance at stopping with "wrong kernel version" +# instead of some related build failure. +SUBDIRS = $(DIRS24) obdclass mds utils ptlrpc ldlm lib obdfilter mdc osc ost +SUBDIRS+= llite obdecho lov cobd tests doc scripts conf +endif DIST_SUBDIRS = $(SUBDIRS) EXTRA_DIST = BUGS FDL Rules include archdep.m4 kernel_patches diff --git a/lustre/Rules b/lustre/Rules index 069e89a..d4e5ed7 100644 --- a/lustre/Rules +++ b/lustre/Rules @@ -10,6 +10,7 @@ # name_SOURCES = my.c files.c # include $(top_srcdir)/Rules + $(MODULE).o: $($(MODULE)_OBJECTS) $(LD) -m "`$(LD) --help | awk '/supported emulations/ {print $$4}'`" -r -o $(MODULE).o $($(MODULE)_OBJECTS) diff --git a/lustre/archdep.m4 b/lustre/archdep.m4 index 58a6576..2bdd785 100644 --- a/lustre/archdep.m4 +++ b/lustre/archdep.m4 @@ -1,4 +1,10 @@ +AC_ARG_WITH(lib, [ --with-lib compile lustre library], host_cpu="lib") + AC_MSG_CHECKING(if you are running user mode linux for $host_cpu ...) +if test $host_cpu = "lib" ; then + host_cpu="lib" + AC_MSG_RESULT(no building Lustre library) +else if test -e $LINUX/include/asm-um ; then if test X`ls -id $LINUX/include/asm/ | awk '{print $1}'` = X`ls -id $LINUX/include/asm-um | awk '{print $1}'` ; then host_cpu="um"; @@ -10,19 +16,41 @@ fi else AC_MSG_RESULT(no (asm-um missing)) fi +fi AC_MSG_CHECKING(setting make flags system architecture: ) case ${host_cpu} in + lib ) + AC_MSG_RESULT($host_cpu) + KCFLAGS='-g -Wall ' + KCPPFLAGS='-D__arch_lib__ ' + MOD_LINK=elf_i386 +;; um ) AC_MSG_RESULT($host_cpu) KCFLAGS='-g -Wall -pipe -Wno-trigraphs -Wstrict-prototypes -fno-strict-aliasing -fno-common ' - KCPPFLAGS='-D__KERNEL__ -U__i386__ -Ui386 -DUM_FASTCALL -D__arch_um__ -DSUBARCH="i386" -DNESTING=0 -D_LARGEFILE64_SOURCE -Derrno=kernel_errno -DPATCHLEVEL=4 -DMODULE -I$(LINUX)/arch/um/include ' + case ${linux25} in + yes ) + KCPPFLAGS='-D__KERNEL__ -U__i386__ -Ui386 -DUM_FASTCALL -D__arch_um__ -DSUBARCH="i386" -DNESTING=0 -D_LARGEFILE64_SOURCE -Derrno=kernel_errno -DPATCHLEVEL=4 -DMODULE -I$(LINUX)/arch/um/include -I$(LINUX)/arch/um/kernel/tt/include -O2 -nostdinc -iwithprefix include -DKBUILD_BASENAME=$(MODULE) -DKBUILD_MODNAME=$(MODULE) ' + ;; + * ) + KCPPFLAGS='-D__KERNEL__ -U__i386__ -Ui386 -DUM_FASTCALL -D__arch_um__ -DSUBARCH="i386" -DNESTING=0 -D_LARGEFILE64_SOURCE -Derrno=kernel_errno -DPATCHLEVEL=4 -DMODULE -I$(LINUX)/arch/um/include ' + ;; + esac + MOD_LINK=elf_i386 ;; i*86 ) AC_MSG_RESULT($host_cpu) KCFLAGS='-g -O2 -Wall -Wstrict-prototypes -pipe' - KCPPFLAGS='-D__KERNEL__ -DMODULE ' + case ${linux25} in + yes ) + KCPPFLAGS='-D__KERNEL__ -DMODULE -march=i686 -I$(LINUX)/include/asm-i386/mach-default -nostdinc -iwithprefix include ' + ;; + * ) + KCPPFLAGS='-D__KERNEL__ -DMODULE ' + ;; + esac MOD_LINK=elf_i386 ;; @@ -74,6 +102,7 @@ case ${host_cpu} in ;; esac +if test $host_cpu != lib ; then AC_MSG_CHECKING(for MODVERSIONS) if egrep -e 'MODVERSIONS.*1' $LINUX/include/linux/autoconf.h >/dev/null 2>&1; then @@ -92,6 +121,7 @@ else SMPFLAG= AC_MSG_RESULT(no) fi +fi CFLAGS="$KCFLAGS $MFLAGS" ARCHCPPFLAGS="$KCPPFLAGS" diff --git a/lustre/autogen.sh b/lustre/autogen.sh index 9accad4..087ff09 100644 --- a/lustre/autogen.sh +++ b/lustre/autogen.sh @@ -2,5 +2,5 @@ find . -type d -name .deps | xargs rm -rf aclocal && -automake --add-missing && +${AUTOMAKE:-automake} --add-missing && ${AUTOCONF:-autoconf} diff --git a/lustre/cobd/cache_obd.c b/lustre/cobd/cache_obd.c index 72a05cc..67b4e62 100644 --- a/lustre/cobd/cache_obd.c +++ b/lustre/cobd/cache_obd.c @@ -21,6 +21,10 @@ #define DEBUG_SUBSYSTEM S_COBD +#include +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) +#include +#endif #include #include #include diff --git a/lustre/cobd/lproc_cache.c b/lustre/cobd/lproc_cache.c index 5170829..7e5c267 100644 --- a/lustre/cobd/lproc_cache.c +++ b/lustre/cobd/lproc_cache.c @@ -33,16 +33,20 @@ static int rd_target(char *page, char **start, off_t off, int count, int *eof, void *data) { struct obd_device *dev = (struct obd_device*)data; - struct lustre_handle *conn = &dev->u.cobd.cobd_target; + struct lustre_handle *conn; struct obd_export *exp; int rc; + LASSERT(dev != NULL); + conn = &dev->u.cobd.cobd_target; + if ((dev->obd_flags & OBD_SET_UP) == 0) rc = snprintf (page, count, "not set up\n"); else { exp = class_conn2export (conn); LASSERT(exp != NULL); - rc = snprintf(page, count, "%s\n", exp->exp_obd->obd_uuid.uuid); + rc = snprintf(page, count, "%s\n", + exp->exp_obd->obd_uuid.uuid); } return (rc); } @@ -51,16 +55,20 @@ static int rd_cache(char *page, char **start, off_t off, int count, int *eof, void *data) { struct obd_device *dev = (struct obd_device*)data; - struct lustre_handle *conn = &dev->u.cobd.cobd_cache; + struct lustre_handle *conn; struct obd_export *exp; int rc; + LASSERT(dev != NULL); + conn = &dev->u.cobd.cobd_cache; + if ((dev->obd_flags & OBD_SET_UP) == 0) rc = snprintf (page, count, "not set up\n"); else { exp = class_conn2export (conn); LASSERT (exp != NULL); - rc = snprintf(page, count, "%s\n", exp->exp_obd->obd_uuid.uuid); + rc = snprintf(page, count, "%s\n", + exp->exp_obd->obd_uuid.uuid); } return (rc); } diff --git a/lustre/conf/lustre.dtd b/lustre/conf/lustre.dtd index 73f7c95..8d575a61 100644 --- a/lustre/conf/lustre.dtd +++ b/lustre/conf/lustre.dtd @@ -10,10 +10,10 @@ - + - + @@ -29,9 +29,9 @@ lo CDATA #REQUIRED hi CDATA #IMPLIED > - + @@ -43,18 +43,22 @@ - - + + - + + + + - + + target_ref | node_ref )*> @@ -71,8 +75,8 @@ - - + + @@ -83,29 +87,39 @@ + + - - + + + + + + + + - - + + + + diff --git a/lustre/conf/lustre2ldif.xsl b/lustre/conf/lustre2ldif.xsl index c7ea957..f3c1364 100644 --- a/lustre/conf/lustre2ldif.xsl +++ b/lustre/conf/lustre2ldif.xsl @@ -76,8 +76,8 @@ devpath: devsize: -networkRef: -mdsRef: +nodeRef: +targetRef: @@ -104,13 +104,14 @@ uuid: -