[Pkg-lustre-svn-commit] updated: [09275dc] Imported Upstream version 1.8.1.1

Patrick Winnertz winnie at debian.org
Wed Oct 28 11:23:00 UTC 2009


The following commit has been merged in the master branch:
commit 09275dc946ca46c4ca927e60fce92b2f6baf156e
Author: Patrick Winnertz <winnie at debian.org>
Date:   Wed Oct 28 12:21:00 2009 +0100

    Imported Upstream version 1.8.1.1

diff --git a/aclocal.m4 b/aclocal.m4
index 45b6f1f..9bfd855 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -3392,6 +3392,7 @@ 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/kernel_patches/targets/2.6-oel5.target
 lustre/ldlm/Makefile
 lustre/liblustre/Makefile
 lustre/liblustre/tests/Makefile
diff --git a/autoMakefile.am b/autoMakefile.am
index a6e21e4..970e4de 100644
--- a/autoMakefile.am
+++ b/autoMakefile.am
@@ -44,4 +44,8 @@ checkstack-clean:
 module-dist-hook:
 	if [ -d CVS -o -d .git ]; then \
 	    perl lustre/scripts/tree_status.pl > $(distdir)/tree_status; \
+	elif [ -f tree_status ]; then \
+	    cp tree_status $(distdir)/tree_status; \
+	else \
+	    echo -e "I have no idea how to create a tree_status file in $(distdir).\nPlease file a bug at http://bugzilla.lustre.org/"; \
 	fi
diff --git a/autoMakefile.in b/autoMakefile.in
index d91e4f1..dba79f0 100644
--- a/autoMakefile.in
+++ b/autoMakefile.in
@@ -339,7 +339,8 @@ CONFIG_CLEAN_FILES = Makefile Rules lustre.spec \
 	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/kernel_patches/targets/sles-2.4.target \
+	lustre/kernel_patches/targets/2.6-oel5.target
 DIST_SOURCES =
 
 RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
@@ -421,6 +422,8 @@ lustre/kernel_patches/targets/suse-2.4.21-2.target: $(top_builddir)/config.statu
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 lustre/kernel_patches/targets/sles-2.4.target: $(top_builddir)/config.status $(top_srcdir)/lustre/kernel_patches/targets/sles-2.4.target.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
+lustre/kernel_patches/targets/2.6-oel5.target: $(top_builddir)/config.status $(top_srcdir)/lustre/kernel_patches/targets/2.6-oel5.target.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
 uninstall-info-am:
 
 # This directory's subdirectories are mostly independent; you can cd
@@ -854,6 +857,10 @@ checkstack-clean:
 module-dist-hook:
 	if [ -d CVS -o -d .git ]; then \
 	    perl lustre/scripts/tree_status.pl > $(distdir)/tree_status; \
+	elif [ -f tree_status ]; then \
+	    cp tree_status $(distdir)/tree_status; \
+	else \
+	    echo -e "I have no idea how to create a tree_status file in $(distdir).\nPlease file a bug at http://bugzilla.lustre.org/"; \
 	fi
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/build/lbuild b/build/lbuild
index 01ea463..68ef1df 100755
--- a/build/lbuild
+++ b/build/lbuild
@@ -282,6 +282,9 @@ check_options() {
         2.6-sles11)
             CANONICAL_TARGET="sles11"
             ;;
+        2.6-oel5)
+            CANONICAL_TARGET="oel5"
+            ;;
         hp_pnnl-2.4)
             CANONICAL_TARGET="hp-pnnl-2.4"
             ;;
diff --git a/configure b/configure
index ee0cb79..72de259 100755
--- a/configure
+++ b/configure
@@ -1427,8 +1427,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 AC_LUSTRE_MAJOR=1
 AC_LUSTRE_MINOR=8
 AC_LUSTRE_PATCH=1
-AC_LUSTRE_FIX=0
-AC_LUSTRE_VERSION_STRING=1.8.1
+AC_LUSTRE_FIX=1
+AC_LUSTRE_VERSION_STRING=1.8.1.1
 AC_LUSTRE_VER_ALLOWED_OFFSET="OBD_OCD_VERSION(0,0,1,32)"
 AC_LUSTRE_LIB_VER_OFFSET_WARN="OBD_OCD_VERSION(0,0,1,32)"
 AC_LUSTRE_CLI_VER_OFFSET_WARN="OBD_OCD_VERSION(0,2,0,0)"
@@ -1463,7 +1463,7 @@ else
 fi
 
 
-if test "1.8.1" = "LUSTRE""_VERSION" ; then
+if test "1.8.1.1" = "LUSTRE""_VERSION" ; then
 	{ { echo "$as_me:$LINENO: error: This script was not built with a version number." >&5
 echo "$as_me: error: This script was not built with a version number." >&2;}
    { (exit 1); exit 1; }; }
@@ -1831,7 +1831,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='lustre'
- VERSION='1.8.1'
+ VERSION='1.8.1.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -18621,7 +18621,7 @@ case $lb_target_os in
 		;;
 esac
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ac_config_files="$ac_config_files lustre/Makefile lustre/autoMakefile lustre/autoconf/Makefile lustre/contrib/Makefile lustre/doc/Makefile lustre/include/Makefile lustre/include/lustre_ver.h lustre/include/linux/Makefile lustre/include/lustre/Makefile lustre/kernel_patches/targets/2.6-suse.target lustre/kernel_patches/targets/2.6-vanilla.target lustre/kernel_patches/targets/2.6-rhel4.target lustre/kernel_patches/targets/2.6-rhel5.target lustre/kernel_patches/targets/2.6-fc5.target lustre/kernel_patches/targets/2.6-patchless.target lustre/kernel_patches/targets/2.6-sles10.target lustre/kernel_patches/targets/2.6-sles11.target lustre/kernel_patches/targets/hp_pnnl-2.4.target 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/ldlm/Makefile lustre/liblustre/Makefile lustre/liblustre/tests/Makefile lustre/liblustre/tests/mpi/Makefile lustre/llite/Makefile lustre/llite/autoMakefile lustre/lov/Makefile lustre/lov/autoMakefile lustre/lvfs/Makefile lustre/lvfs/autoMakefile lustre/mdc/Makefile lustre/mdc/autoMakefile lustre/mds/Makefile lustre/mds/autoMakefile lustre/obdclass/Makefile lustre/obdclass/autoMakefile lustre/obdclass/linux/Makefile lustre/obdecho/Makefile lustre/obdecho/autoMakefile lustre/obdfilter/Makefile lustre/obdfilter/autoMakefile lustre/osc/Makefile lustre/osc/autoMakefile lustre/ost/Makefile lustre/ost/autoMakefile lustre/mgc/Makefile lustre/mgc/autoMakefile lustre/mgs/Makefile lustre/mgs/autoMakefile lustre/ptlrpc/Makefile lustre/ptlrpc/autoMakefile lustre/quota/Makefile lustre/quota/autoMakefile lustre/scripts/Makefile lustre/tests/Makefile lustre/tests/mpi/Makefile lustre/utils/Makefile"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ac_config_files="$ac_config_files lustre/Makefile lustre/autoMakefile lustre/autoconf/Makefile lustre/contrib/Makefile lustre/doc/Makefile lustre/include/Makefile lustre/include/lustre_ver.h lustre/include/linux/Makefile lustre/include/lustre/Makefile lustre/kernel_patches/targets/2.6-suse.target lustre/kernel_patches/targets/2.6-vanilla.target lustre/kernel_patches/targets/2.6-rhel4.target lustre/kernel_patches/targets/2.6-rhel5.target lustre/kernel_patches/targets/2.6-fc5.target lustre/kernel_patches/targets/2.6-patchless.target lustre/kernel_patches/targets/2.6-sles10.target lustre/kernel_patches/targets/2.6-sles11.target lustre/kernel_patches/targets/hp_pnnl-2.4.target 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/kernel_patches/targets/2.6-oel5.target lustre/ldlm/Makefile lustre/liblustre/Makefile lustre/liblustre/tests/Makefile lustre/liblustre/tests/mpi/Makefile lustre/llite/Makefile lustre/llite/autoMakefile lustre/lov/Makefile lustre/lov/autoMakefile lustre/lvfs/Makefile lustre/lvfs/autoMakefile lustre/mdc/Makefile lustre/mdc/autoMakefile lustre/mds/Makefile lustre/mds/autoMakefile lustre/obdclass/Makefile lustre/obdclass/autoMakefile lustre/obdclass/linux/Makefile lustre/obdecho/Makefile lustre/obdecho/autoMakefile lustre/obdfilter/Makefile lustre/obdfilter/autoMakefile lustre/osc/Makefile lustre/osc/autoMakefile lustre/ost/Makefile lustre/ost/autoMakefile lustre/mgc/Makefile lustre/mgc/autoMakefile lustre/mgs/Makefile lustre/mgs/autoMakefile lustre/ptlrpc/Makefile lustre/ptlrpc/autoMakefile lustre/quota/Makefile lustre/quota/autoMakefile lustre/scripts/Makefile lustre/tests/Makefile lustre/tests/mpi/Makefile lustre/utils/Makefile"
 
 case $lb_target_os in
         darwin)
@@ -19277,7 +19277,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by Lustre $as_me 1.8.1, which was
+This file was extended by Lustre $as_me 1.8.1.1, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19340,7 +19340,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-Lustre config.status 1.8.1
+Lustre config.status 1.8.1.1
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -19525,6 +19525,7 @@ do
   "lustre/kernel_patches/targets/rhel-2.4.target" ) CONFIG_FILES="$CONFIG_FILES lustre/kernel_patches/targets/rhel-2.4.target" ;;
   "lustre/kernel_patches/targets/suse-2.4.21-2.target" ) CONFIG_FILES="$CONFIG_FILES lustre/kernel_patches/targets/suse-2.4.21-2.target" ;;
   "lustre/kernel_patches/targets/sles-2.4.target" ) CONFIG_FILES="$CONFIG_FILES lustre/kernel_patches/targets/sles-2.4.target" ;;
+  "lustre/kernel_patches/targets/2.6-oel5.target" ) CONFIG_FILES="$CONFIG_FILES lustre/kernel_patches/targets/2.6-oel5.target" ;;
   "lustre/ldlm/Makefile" ) CONFIG_FILES="$CONFIG_FILES lustre/ldlm/Makefile" ;;
   "lustre/liblustre/Makefile" ) CONFIG_FILES="$CONFIG_FILES lustre/liblustre/Makefile" ;;
   "lustre/liblustre/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES lustre/liblustre/tests/Makefile" ;;
diff --git a/ldiskfs/ChangeLog b/ldiskfs/ChangeLog
index d275fcc..3210a44 100644
--- a/ldiskfs/ChangeLog
+++ b/ldiskfs/ChangeLog
@@ -1,3 +1,13 @@
+TBD  Sun Microsystems, Inc.
+	* version 3.0.9.2
+
+
+-------------------------------------------------------------------------------
+2009-10-16  Sun Microsystems, Inc.
+	* version 3.0.9.1
+
+
+-------------------------------------------------------------------------------
 2009-07-31  Sun Microsystems, Inc.
 	* version 3.0.9
 
diff --git a/ldiskfs/build/lbuild b/ldiskfs/build/lbuild
index 01ea463..68ef1df 100755
--- a/ldiskfs/build/lbuild
+++ b/ldiskfs/build/lbuild
@@ -282,6 +282,9 @@ check_options() {
         2.6-sles11)
             CANONICAL_TARGET="sles11"
             ;;
+        2.6-oel5)
+            CANONICAL_TARGET="oel5"
+            ;;
         hp_pnnl-2.4)
             CANONICAL_TARGET="hp-pnnl-2.4"
             ;;
diff --git a/ldiskfs/kernel_patches/patches/ext4-disable-write-bar-by-default.patch b/ldiskfs/kernel_patches/patches/ext4-disable-write-bar-by-default.patch
new file mode 100644
index 0000000..1a9e9a3
--- /dev/null
+++ b/ldiskfs/kernel_patches/patches/ext4-disable-write-bar-by-default.patch
@@ -0,0 +1,13 @@
+Index: linux-stage/fs/ext4/super.c
+===================================================================
+--- linux-stage.orig/fs/ext4/super.c
++++ linux-stage/fs/ext4/super.c
+@@ -2457,7 +2457,7 @@ static int ext4_fill_super(struct super_
+ 	sbi->s_resgid = le16_to_cpu(es->s_def_resgid);
+ 
+ 	set_opt(sbi->s_mount_opt, RESERVATION);
+-	set_opt(sbi->s_mount_opt, BARRIER);
++	/* set_opt(sbi->s_mount_opt, BARRIER); */
+ 
+ 	/*
+ 	 * turn on extents feature by default in ext4 filesystem
diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series
index e4c0202..2e849b2 100644
--- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series
+++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series
@@ -27,3 +27,4 @@ ext4-convert-group-lock-sles11.patch
 ext4-force_over_8tb-sles11.patch
 ext4-claim_inode-free_inode-race.patch
 ext4-pa_lock-typo.patch
+ext4-disable-write-bar-by-default.patch
diff --git a/lnet/ChangeLog b/lnet/ChangeLog
index 5ec02a0..b123847 100644
--- a/lnet/ChangeLog
+++ b/lnet/ChangeLog
@@ -1,3 +1,36 @@
+TBD Sun Microsystems, Inc.
+        * version 1.8.1.2
+	* Support for networks:
+	 socklnd   - any kernel supported by Lustre,
+	 qswlnd    - Qsnet kernel modules 5.20 and later,
+	 openiblnd - IbGold 1.8.2,
+	 o2iblnd   - OFED 1.1, 1.2.0, 1.2.5, 1.3, and 1.4.1
+	 viblnd    - Voltaire ibhost 3.4.5 and later,
+	 ciblnd    - Topspin 3.2.0,
+	 iiblnd    - Infiniserv 3.3 + PathBits patch,
+	 gmlnd     - GM 2.1.22 and later,
+	 mxlnd     - MX 1.2.1 or later,
+	 ptllnd    - Portals 3.3 / UNICOS/lc 1.5.x, 2.0.x
+
+
+------------------------------------------------------------------------------- 
+2009-10-16 Sun Microsystems, Inc.
+        * version 1.8.1.1
+	* Support for networks:
+	 socklnd   - any kernel supported by Lustre,
+	 qswlnd    - Qsnet kernel modules 5.20 and later,
+	 openiblnd - IbGold 1.8.2,
+	 o2iblnd   - OFED 1.1, 1.2.0, 1.2.5, 1.3, and 1.4.1
+	 viblnd    - Voltaire ibhost 3.4.5 and later,
+	 ciblnd    - Topspin 3.2.0,
+	 iiblnd    - Infiniserv 3.3 + PathBits patch,
+	 gmlnd     - GM 2.1.22 and later,
+	 mxlnd     - MX 1.2.1 or later,
+	 ptllnd    - Portals 3.3 / UNICOS/lc 1.5.x, 2.0.x
+
+
+------------------------------------------------------------------------------- 
+
 2009-07-31  Sun Microsystems, Inc.
 	* version 1.8.1
 	* Support for networks:
diff --git a/lnet/doc/Makefile.am b/lnet/doc/Makefile.am
index fe4c64e..15ecbc6 100644
--- a/lnet/doc/Makefile.am
+++ b/lnet/doc/Makefile.am
@@ -56,10 +56,10 @@ all: $(DOCS)
 
 # update date and version in document
 date := $(shell date +%x)
-tag := $(shell echo '$$Name: v1_8_1_RC4 $$' | sed -e 's/^\$$Na''me: *\$$$$/HEAD/; s/^\$$Na''me: \(.*\) \$$$$/\1/')
+tag := $(shell echo '$$Name: v1_8_1_1_RC4 $$' | sed -e 's/^\$$Na''me: *\$$$$/HEAD/; s/^\$$Na''me: \(.*\) \$$$$/\1/')
 addversion = sed -e 's|@T''AG@|$(tag)|g; s|@VER''SION@|$(VERSION)|g; s|@DA''TE@|$(date)|g'
 
-# Regenerate when the $(VERSION) or $Name: v1_8_1_RC4 $ changes.
+# Regenerate when the $(VERSION) or $Name: v1_8_1_1_RC4 $ changes.
 .INTERMEDIATE: $(GENERATED)
 $(GENERATED) : %.lyx: %.lin Makefile
 	$(addversion) $< > $@
diff --git a/lnet/doc/Makefile.in b/lnet/doc/Makefile.in
index 34cc61c..16777fb 100644
--- a/lnet/doc/Makefile.in
+++ b/lnet/doc/Makefile.in
@@ -345,7 +345,7 @@ EXTRA_DIST = $(DOCS) $(IMAGES) $(LYXFILES)
 
 # update date and version in document
 date := $(shell date +%x)
-tag := $(shell echo '$$Name: v1_8_1_RC4 $$' | sed -e 's/^\$$Na''me: *\$$$$/HEAD/; s/^\$$Na''me: \(.*\) \$$$$/\1/')
+tag := $(shell echo '$$Name: v1_8_1_1_RC4 $$' | sed -e 's/^\$$Na''me: *\$$$$/HEAD/; s/^\$$Na''me: \(.*\) \$$$$/\1/')
 addversion = sed -e 's|@T''AG@|$(tag)|g; s|@VER''SION@|$(VERSION)|g; s|@DA''TE@|$(date)|g'
 subdir = lnet/doc
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -489,7 +489,7 @@ uninstall-am: uninstall-info-am
 
 all: $(DOCS)
 
-# Regenerate when the $(VERSION) or $Name: v1_8_1_RC4 $ changes.
+# Regenerate when the $(VERSION) or $Name: v1_8_1_1_RC4 $ changes.
 .INTERMEDIATE: $(GENERATED)
 $(GENERATED) : %.lyx: %.lin Makefile
 	$(addversion) $< > $@
diff --git a/lustre.spec b/lustre.spec
index e0579aa..ca0b26a 100644
--- a/lustre.spec
+++ b/lustre.spec
@@ -1,5 +1,5 @@
 # lustre.spec
-%{!?version: %define version 1.8.1}
+%{!?version: %define version 1.8.1.1}
 %{!?kversion: %define kversion }
 %{!?release: %define release }
 %{!?lustre_name: %define lustre_name lustre}
diff --git a/lustre/ChangeLog b/lustre/ChangeLog
index fb6be26..3dfc7a1 100644
--- a/lustre/ChangeLog
+++ b/lustre/ChangeLog
@@ -1,3 +1,154 @@
+2009-10-16 Sun Microsystems, Inc.
+	* version 1.8.1.1
+	* Support for kernels:
+	 2.6.16.60-0.42.4 (SLES 10),
+	 2.6.27.29-0.1 (SLES11, i686 & x84_64 only),
+	 2.6.18-128.7.1.el5 (RHEL 5),
+	 2.6.18-128.7.1.el5 (OEL 5),
+	* Client support for unpatched kernels:
+	  (see http://wiki.lustre.org/index.php?title=Patchless_Client)
+	  2.6.16 - 2.6.27 vanilla (kernel.org)
+	* Recommended e2fsprogs version: 1.41.6.sun1
+	* ext4 support for RHEL5 is experimental and thus should not be
+	  used in production.
+
+Severity   : enhancement
+Bugzilla   : 20539
+Description: Add OEL5 support.
+
+Severity   : enhancement
+Bugzilla   : 19848
+Description: Update kernel to SLES11 2.6.27.29-0.1.
+
+Severity   : major
+Bugzilla   : 20560
+Description: File checksum failures with OST read cache on
+Details    : Disable page poisoning when the bulk transfer has to be aborted
+	     because the client got evicted.
+
+Severity   : normal
+Bugzilla   : 19557
+Description: Don't allow make backward step on assiging osc next id.
+Details    : race between allocation next id and ll_sync thread can be cause
+	     of set wrong osc next id and can be kill valid ost objects.
+
+Severity   : enhancement
+Bugzilla   : 20400
+Description: Update kernel to RHEL5 2.6.18-128.7.1.el5.
+
+Severity   : enhancement
+Bugzilla   : 20758
+Description: Update kernel to SLES10 SP2 2.6.16.60-0.42.4.
+
+Severity   : normal
+Bugzilla   : 20533
+Description: Changes in raid5-large-io-rhel5.patch to calculate sectors properly
+
+Severity   : normal
+Bugzilla   : 20533
+Description: Increase the default BLK_DEF_MAX_SECTORS value for RHEL5 and SLES11
+
+Severity   : normal
+Bugzilla   : 20482
+Description: Error handling in osc_statfs_interpret() has been improved.
+Details    : Check in osc_statfs_interpret() for EBADR.
+
+Severity   : normal
+Bugzilla   : 20482
+Description: Do not send statfs() requests to OSTs disabled by administrator.
+Details    : Check in lov_prep_statfs_set() for non-NULL ltd_exp.
+
+Severity   : normal
+Bugzilla   : 20146
+Description: Do not update ctime for the deleted inode.
+Details    : Check in mds_reint_unlink() before calling fsfilt_setattr().
+
+Severity   : normal
+Bugzilla   : 20146
+Description: Increase of the size of the LDLM resource hash.
+Details    : Bump up RES_HASH_BITS=12.
+
+Severity   : normal
+Bugzilla   : 19934
+Description: correctly send lsm on open replay
+Details    : MDS is trust to LSM size on replay open, but client can set wrong size
+	     of lsm buffer.
+
+Severity   : normal
+Bugzilla   : 20321
+Description: Deadlock between filter_destroy() and filter_commitrw_write().
+Details    : filter_destroy() does not hold the DLM lock over the whole
+	     operation. If the DLM lock is dropped, filter_commitrw() can go
+	     through, causing the deadlock between page lock and i_mutex.
+	     The i_alloc_sem should also be hold in filter_destroy() while
+	     truncating the file.
+
+Severity   : normal
+Bugzilla   : 20008
+Description: truncate starts GFP_FS allocation under transaction causing deadlock
+Details    : ldiskfs_truncate calls grab_cache_page which may start page
+	     allocation under an open transaction. This may lead to
+	     calling prune_icache with consequent lustre reentrance.
+
+Severity   : normal
+Frequency  : only when down/upgrading the MDS to 1.6/1.8 while 1.8 clients are
+	     still up and when the OST pool feature is used
+Bugzilla   : 20318
+Description: interop testing got LBUG when run dd with OST pool
+	     :LustreError: 30032:0:(llite_lib.c:1913:ll_replace_lsm()) LBUG
+Details    : down/upgrading the MDS to a version that doesn't/does support OST
+	     pool can cause clients to crash because the lsm has changed
+	     behind their back.
+
+Severity   : normal
+Bugzilla   : 20550
+Description: missing tree_status on 1.8.1 RPM build
+Details    : make rpms failed due because the tree_status file is missing.
+
+Severity   : normal
+Bugzilla   : 19551
+Description: continuing LustreError "mds adjust qunit failed!"
+Details    : don't print message on the console when ->adjust_qunit fails.
+
+Severity   : normal
+Bugzilla   : 18618
+Description: don't increase ldlm timeout if previous client was evicted
+Details    : if a client doesn't respond to a blocking callback within the
+	     adaptive ldlm enqueue timeout, don't adjust the adaptive estimate
+	     when the lock is next granted.
+
+Severity   : normal
+Bugzilla   : 20518
+Description: ost is being unmounted w/o all writes to last_rcvd landing on disk.
+	     affects recovery negatively.
+Details    : make sure all exports have been properly destroyed by the zombie
+	     thread processed before stopping the target.
+
+Severity   : normal
+Bugzilla   : 20205
+Description: Performance degradation with O_DIRECT between 1.6 & 1.8.1 b190
+Details    : disable write barrier for ext4/SLES11.
+
+Severity   : normal
+Bugzilla   : 18571
+Description: Kernel panic - not syncing: Out of memory and no killable
+	     processes... on OSS when iozone
+Details    : fix memory leak in the journal checksum patch.
+
+Severity   : normal
+Bugzilla   : 18793
+Description: group quota "too many blocks" OSS crashes
+Details    : we should keep the same uid/gid for lquota_chkquota() and
+	     lquota_pending_commit()
+
+Severity   : normal
+Bugzilla   : 18630
+Description: LustreError: 9153:0:(quota_context.c:622:dqacq_completion()) LBUG
+Details    : don't LBUG on release quota error. Just a workaround until the
+	     problem is understood.
+
+-------------------------------------------------------------------------------
+
 2009-07-31 Sun Microsystems, Inc.
 	* version 1.8.1
 	* Support for kernels:
@@ -29,7 +180,7 @@ Details    : 1.8 mds is allocate to big buffer to LOV EA data and this produce
 Severity   : normal
 Bugzilla   : 19917
 Description: Repeated atomic allocation failures.
-Details    : Use GFP_HIGHUSER | __GFP_NOMEMALLOC flags for memory allocations 
+Details    : Use GFP_HIGHUSER | __GFP_NOMEMALLOC flags for memory allocations
 	     to generate memory pressure and allow reclaiming of inactive pages.
 	     At the same time, do not allow to exhaust emergency pools.
 	     For local clients the use of GFP_NOFS will be introduced in 1.8.2
@@ -2523,7 +2674,7 @@ Bugzilla   : 13129
 Description: server LBUG when shutting down
 Details    : Block umount forever until the mount refcount is zero rather
 	     than giving up after an arbitrary timeout.
-	
+
 Severity   : enhancement
 Bugzilla   : 12194
 Description: add optional extra BUILD_VERSION info
@@ -2952,7 +3103,7 @@ Details    : quota slave depends qctxt->lqc_import to send its quota request.
 	     This pointer will be invalid if mds did failover or broke its
 	     connect to osts, which leads to LBUG.
 
-Severity   : normal	
+Severity   : normal
 Frequency  : when qunit size is too small(less than 20M)
 Bugzilla   : 12588
 Description: write is stopped by improper -EDQUOT
@@ -3046,7 +3197,7 @@ Details    : If a client tried to create a new file before the MDT had
 	     connected to any OSTs, the create would return EIO.  Now
 	     the client will simply block until the MDT connects to the
 	     first OST and the create can succeed.
-	
+
 Severity   : normal
 Frequency  : only for SLES9
 Bugzilla   : 12543
@@ -3101,7 +3252,7 @@ Frequency  : rare
 Description: Sometimes precreate code can triger create object on wrong ost
 Details    : Wrong protected or not not restored variables aftre precreate loop
 	     can produce creation object on wrong ost.
-	
+
 Severity   : normal
 Frequency  : oss recovery
 Bugzilla   : 10800
diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4
index d4f3c2c..1c66866 100644
--- a/lustre/autoconf/lustre-core.m4
+++ b/lustre/autoconf/lustre-core.m4
@@ -2414,6 +2414,7 @@ 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/kernel_patches/targets/2.6-oel5.target
 lustre/ldlm/Makefile
 lustre/liblustre/Makefile
 lustre/liblustre/tests/Makefile
diff --git a/lustre/autoconf/lustre-version.ac b/lustre/autoconf/lustre-version.ac
index 9b0ae63..34ea6bf 100644
--- a/lustre/autoconf/lustre-version.ac
+++ b/lustre/autoconf/lustre-version.ac
@@ -1,7 +1,7 @@
 m4_define([LUSTRE_MAJOR],[1])
 m4_define([LUSTRE_MINOR],[8])
 m4_define([LUSTRE_PATCH],[1])
-m4_define([LUSTRE_FIX],[0])
+m4_define([LUSTRE_FIX],[1])
 # Note: we're starting prerelease versions at 50 this time.
 
 dnl # don't forget to update the service tags info
diff --git a/lustre/doc/Makefile.am b/lustre/doc/Makefile.am
index d4d36b6..84c0b52 100644
--- a/lustre/doc/Makefile.am
+++ b/lustre/doc/Makefile.am
@@ -49,7 +49,8 @@ SUFFIXES = .lin .lyx .pdf .ps .sgml .html .txt .tex .fig .eps .dvi
 MANFILES = lustre.7 lfs.1 mount.lustre.8 mkfs.lustre.8 tunefs.lustre.8 lctl.8 \
 	llverdev.8 llbackup.8 llapi_quotactl.3 llobdstat.8 llstat.8 \
 	plot-llstat.8 l_getgroups.8 lst.8 routerstat.8 lshowmount.8 \
-	ll_recover_lost_found_objs.8 llog_reader.8 llapi_file_open.3
+	ll_recover_lost_found_objs.8 llog_reader.8 llapi_file_open.3 \
+	llapi_file_create.3 llapi_file_get_stripe.3 liblustreapi.7
 if UTILS
 man_MANS = $(MANFILES)
 endif
diff --git a/lustre/doc/Makefile.in b/lustre/doc/Makefile.in
index b6bfb5f..e0395c4 100644
--- a/lustre/doc/Makefile.in
+++ b/lustre/doc/Makefile.in
@@ -343,7 +343,8 @@ SUFFIXES = .lin .lyx .pdf .ps .sgml .html .txt .tex .fig .eps .dvi
 MANFILES = lustre.7 lfs.1 mount.lustre.8 mkfs.lustre.8 tunefs.lustre.8 lctl.8 \
 	llverdev.8 llbackup.8 llapi_quotactl.3 llobdstat.8 llstat.8 \
 	plot-llstat.8 l_getgroups.8 lst.8 routerstat.8 lshowmount.8 \
-	ll_recover_lost_found_objs.8 llog_reader.8 llapi_file_open.3
+	ll_recover_lost_found_objs.8 llog_reader.8 llapi_file_open.3 \
+	llapi_file_create.3 llapi_file_get_stripe.3 liblustreapi.7
 
 @UTILS_TRUE at man_MANS = $(MANFILES)
 
diff --git a/lustre/doc/liblustreapi.7 b/lustre/doc/liblustreapi.7
new file mode 100644
index 0000000..ebd86bf
--- /dev/null
+++ b/lustre/doc/liblustreapi.7
@@ -0,0 +1,11 @@
+.TH liblustreapi 7 "2009 Aug 10" Lustre liblustreapi
+.SH NAME
+liblustre \- The liblustre library
+.SH DESCRIPTION
+The liblustre library provides functions to access and/or modify settings specific to the Lustre filesystem (allocation policies, quotas, etc).
+.SH "SEE ALSO"
+.BR lustre (7),
+.BR llapi_file_create (3),
+.BR llapi_file_open (3),
+.BR llapi_file_get_stripe (3),
+.BR llapi_quotactl (3)
diff --git a/lustre/doc/llapi_file_create.3 b/lustre/doc/llapi_file_create.3
new file mode 100644
index 0000000..60dd263
--- /dev/null
+++ b/lustre/doc/llapi_file_create.3
@@ -0,0 +1 @@
+.so man3/llapi_file_open.3
diff --git a/lustre/doc/llapi_file_get_stripe.3 b/lustre/doc/llapi_file_get_stripe.3
new file mode 100644
index 0000000..e456468
--- /dev/null
+++ b/lustre/doc/llapi_file_get_stripe.3
@@ -0,0 +1,222 @@
+.TH llapi_file_get_stripe 3 "2009 Jul 22" Lustre liblustreapi
+.SH NAME
+llapi_file_get_stripe \- get striping information for a file or a directory on a Lustre filesystem
+.SH SYNOPSIS
+.nf
+.B #include <sys/types.h>
+.B #include <sys/stat.h>
+.B #include <fcntl.h>
+.B #include <liblustre.h>
+.B #include <lustre/lustre_idl.h>
+.B #include <lustre/liblustreapi.h>
+.B #include <lustre/lustre_user.h>
+.sp
+.BI "int llapi_file_get_stripe(const char *"path ", void *"lum );
+.sp
+.fi
+.SH DESCRIPTION
+.LP
+.B llapi_file_get_stripe(\|)
+returns striping information for a file or a directory 
+.I path
+in
+.I lum
+(which should point to a large enough memory region) in one of the following formats:
+
+.nf
+struct lov_user_md_v1 {
+        __u32 lmm_magic;
+        __u32 lmm_pattern;
+        __u64 lmm_object_id;
+        __u64 lmm_object_gr;
+        __u32 lmm_stripe_size;
+        __u16 lmm_stripe_count;
+        __u16 lmm_stripe_offset;
+        struct lov_user_ost_data_v1 lmm_objects[0];
+} __attribute__((packed));
+
+struct lov_user_md_v3 {
+        __u32 lmm_magic;
+        __u32 lmm_pattern;
+        __u64 lmm_object_id;
+        __u64 lmm_object_gr;
+        __u32 lmm_stripe_size;
+        __u16 lmm_stripe_count;
+        __u16 lmm_stripe_offset;
+        char  lmm_pool_name[LOV_MAXPOOLNAME];
+        struct lov_user_ost_data_v1 lmm_objects[0];
+} __attribute__((packed));
+
+struct lov_user_md_join {
+        __u32 lmm_magic;
+        __u32 lmm_pattern;
+        __u64 lmm_object_id;
+        __u64 lmm_object_gr;
+        __u32 lmm_stripe_size;
+        __u32 lmm_stripe_count;
+        __u32 lmm_extent_count;
+        __u64 lmm_tree_id;
+        __u64 lmm_tree_gen;
+        struct llog_logid lmm_array_id;
+        struct lov_user_ost_data_join lmm_objects[0];
+} __attribute__((packed));
+.fi
+
+.TP 20
+.I lmm_magic
+specifies the format of the returned striping information.
+.BR LOV_MAGIC_V1
+is used for lov_user_md_v1.
+.BR LOV_MAGIC_V3
+is used for lov_user_md_v3.
+.BR LOV_MAGIC_JOIN
+is used for lov_user_md_join.
+.TP 20
+.I lmm_pattern
+holds the striping pattern. Only
+.BR LOV_PATTERN_RAID0
+is possible in this Lustre version.
+.TP 20
+.I lmm_object_id
+holds the MDS object id.
+.TP 20
+.I lmm_object_gr
+holds the MDS object group.
+.TP 20
+.I lmm_stripe_size
+holds the stripe size in bytes.
+.TP 20
+.I lmm_stripe_count
+holds the number of OSTs the file is striped across.
+.TP 20
+.I lmm_stripe_offset
+holds the OST index from which the file starts.
+.TP 20
+.I lmm_pool_name
+holds the OST pool name to which the file belongs.
+.TP 20
+.I lmm_objects
+is an array of
+.I lmm_stripe_count
+members containing per OST file information in the following format:
+
+.nf
+struct lov_user_ost_data_v1 {
+        __u64 l_object_id;
+        __u64 l_object_gr;
+        __u32 l_ost_gen;
+        __u32 l_ost_idx;
+} __attribute__((packed));
+.fi
+.TP 20
+.I l_object_id
+holds the OST object id.
+.TP 20
+.I l_object_gr
+holds the OST object group.
+.TP 20
+.I l_ost_gen
+holds the generation of the OST index.
+.TP 20
+.I l_ost_idx
+holds the OST index in LOV.
+.SH RETURN VALUES
+.LP
+.B llapi_file_get_stripe(\|) 
+returns:
+.TP
+0
+on success
+.TP
+!= 0
+on failure,
+.I errno
+is set appropriately.
+.SH ERRORS
+.TP 15
+.SM ENOMEM
+failed to allocate memory.
+.TP 15
+.SM ENAMETOOLONG
+.I path
+was too long.
+.TP 15
+.SM ENOENT
+.I path
+does not point to a file or a directory.
+.TP 15
+.SM ENOTTY
+.I path
+does not point to a Lustre filesystem.
+.TP 15
+.SM EFAULT
+memory region pointed by
+.I lum
+is not properly mapped.
+.SH "EXAMPLE"
+.nf
+#include <sys/vfs.h>
+#include <liblustre.h>
+#include <lnet/lnetctl.h>
+#include <obd.h>
+#include <lustre_lib.h>
+#include <lustre/liblustreapi.h>
+#include <obd_lov.h>
+
+static inline int maxint(int a, int b)
+{
+        return a > b ? a : b;
+}
+
+static void *alloc_lum()
+{
+        int v1, v3, join;
+
+        v1 = sizeof(struct lov_user_md_v1) +
+             LOV_MAX_STRIPE_COUNT * sizeof(struct lov_user_ost_data_v1);
+        v3 = sizeof(struct lov_user_md_v3) +
+             LOV_MAX_STRIPE_COUNT * sizeof(struct lov_user_ost_data_v1);
+        join = sizeof(struct lov_user_md_join) +
+             LOV_MAX_STRIPE_COUNT * sizeof(struct lov_user_ost_data_join);
+
+        return malloc(maxint(maxint(v1, v3), join));
+}
+
+int main(int argc, char** argv)
+{
+        struct lov_user_md *lum_file = NULL;
+        int rc;
+        int lum_size;
+
+        if (argc != 2) {
+                fprintf(stderr, "Usage: %s <filename>\\n", argv[0]);
+                return 1;
+        }
+
+        lum_file = alloc_lum();
+        if (lum_file == NULL) {
+                rc = ENOMEM;
+                goto cleanup;
+        }
+
+        rc = llapi_file_get_stripe(argv[1], lum_file);
+        if (rc) {
+                rc = errno;
+                goto cleanup;
+        }
+
+        /* stripe_size stripe_count */
+        printf("%d %d\\n",
+               lum_file->lmm_stripe_size,
+               lum_file->lmm_stripe_count);
+
+cleanup:
+        if (lum_file != NULL)
+                free(lum_file);
+
+        return rc;
+}
+.fi
+.SH "SEE ALSO"
+.BR lustre (7),
+.BR liblustreapi (7)
diff --git a/lustre/doc/llapi_file_open.3 b/lustre/doc/llapi_file_open.3
index 0d84d72..ce015ac 100644
--- a/lustre/doc/llapi_file_open.3
+++ b/lustre/doc/llapi_file_open.3
@@ -151,4 +151,5 @@ int main(int argc, char *argv[])
 .fi
 .SH "SEE ALSO"
 .BR open (2),
-.BR lustre (7)
+.BR lustre (7),
+.BR liblustreapi (7)
diff --git a/lustre/doc/llapi_quotactl.3 b/lustre/doc/llapi_quotactl.3
index 87ad80c..4866c72 100644
--- a/lustre/doc/llapi_quotactl.3
+++ b/lustre/doc/llapi_quotactl.3
@@ -176,4 +176,5 @@ No disc quota is found for the indicated user.
 Quotas have not been turned on for this filesystem.
 .SH "SEE ALSO"
 .BR lfs (1),
-.BR lustre (7)
+.BR lustre (7),
+.BR liblustreapi (7)
diff --git a/lustre/doc/lst.8 b/lustre/doc/lst.8
index a34bcd9..886ed4f 100644
--- a/lustre/doc/lst.8
+++ b/lustre/doc/lst.8
@@ -78,7 +78,7 @@ lst add_test --batch bulk_rw --from writers --to servers \
 # start running
 lst run bulk_rw
 # display server stats for 30 seconds
-lst stat servers & sleep 30; kill $?
+lst stat servers & sleep 30; kill $!
 # tear down
 lst end_session
 .fi
diff --git a/lustre/doc/lustre.7 b/lustre/doc/lustre.7
index efa92bd..650dc97 100644
--- a/lustre/doc/lustre.7
+++ b/lustre/doc/lustre.7
@@ -70,4 +70,5 @@ http://downloads.lustre.org/
 .BR tunefs.lustre (8),
 .BR mount.lustre (8),
 .BR lctl (8),
-.BR lfs (1)
+.BR lfs (1),
+.BR liblustreapi (7)
diff --git a/lustre/include/lustre_disk.h b/lustre/include/lustre_disk.h
index 1e55a80..31d4351 100644
--- a/lustre/include/lustre_disk.h
+++ b/lustre/include/lustre_disk.h
@@ -258,6 +258,20 @@ struct lsd_client_data {
         __u8  lcd_padding[LR_CLIENT_SIZE - 128];
 };
 
+/* bug20354: the lcd_uuid for export of clients may be wrong */
+static inline void check_lcd(char *obd_name, int index,
+                             struct lsd_client_data *lcd)
+{
+        size_t length = sizeof(lcd->lcd_uuid);
+        if (strnlen((char*)lcd->lcd_uuid, length) == length) {
+                lcd->lcd_uuid[length - 1] = '\0';
+
+                LCONSOLE_ERROR("the client UUID (%s) on %s for exports"
+                               "stored in last_rcvd(index = %d) is bad!\n", 
+                               lcd->lcd_uuid, obd_name, index);
+        }
+}
+
 static inline __u64 lsd_last_transno(struct lsd_client_data *lcd)
 {
         return le64_to_cpu(lcd->lcd_last_transno) >
diff --git a/lustre/include/lustre_dlm.h b/lustre/include/lustre_dlm.h
index cb635f9..5fa1d63 100644
--- a/lustre/include/lustre_dlm.h
+++ b/lustre/include/lustre_dlm.h
@@ -454,7 +454,7 @@ static inline int ns_connect_lru_resize(struct ldlm_namespace *ns)
  *
  */
 
-#define RES_HASH_BITS 10
+#define RES_HASH_BITS 12
 #define RES_HASH_SIZE (1UL << RES_HASH_BITS)
 #define RES_HASH_MASK (RES_HASH_SIZE - 1)
 
diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h
index de90bd1..ed19cf8 100644
--- a/lustre/include/lustre_net.h
+++ b/lustre/include/lustre_net.h
@@ -323,7 +323,11 @@ struct ptlrpc_request {
                 rq_packed_final:1,  /* packed final reply */
                 rq_sent_final:1,    /* stop sending early replies */
                 rq_hp:1,            /* high priority RPC */
-                rq_at_linked:1;     /* link into service's srv_at_array */
+                rq_at_linked:1,     /* link into service's srv_at_array */
+                /* a copy of the request is queued to replay during recovery */
+                rq_copy_queued:1,
+                /* whether the rquest is a copy of another replay request */
+                rq_copy:1;
         enum rq_phase rq_phase;     /* one of RQ_PHASE_* */
         enum rq_phase rq_next_phase; /* one of RQ_PHASE_* to be used next */
         atomic_t rq_refcount;   /* client-side refcount for SENT race,
diff --git a/lustre/include/lustre_ver.h b/lustre/include/lustre_ver.h
index 78804ff..1e336ef 100644
--- a/lustre/include/lustre_ver.h
+++ b/lustre/include/lustre_ver.h
@@ -7,8 +7,8 @@
 #define LUSTRE_MAJOR 1
 #define LUSTRE_MINOR 8
 #define LUSTRE_PATCH 1
-#define LUSTRE_FIX 0
-#define LUSTRE_VERSION_STRING "1.8.1"
+#define LUSTRE_FIX 1
+#define LUSTRE_VERSION_STRING "1.8.1.1"
 #define CLIENT_URN "LUSTRE-181-CLT"
 #define MDS_URN "LUSTRE-181-MDS"
 #define MGS_URN "LUSTRE-181-MGS"
diff --git a/lustre/include/obd.h b/lustre/include/obd.h
index 0762e06..d9e09a4 100644
--- a/lustre/include/obd.h
+++ b/lustre/include/obd.h
@@ -199,11 +199,17 @@ struct obd_info {
 static inline int lov_stripe_md_cmp(struct lov_stripe_md *m1,
                                     struct lov_stripe_md *m2)
 {
+        int len = sizeof(m1->lsm_wire);
+
         /*
          * ->lsm_wire contains padding, but it should be zeroed out during
-         * allocation.
+         * allocation. If either lsm is LOV_MAGIC_V1 do not check that
+         * the pool is the same, due to downgrade/upgrade (b=20318).  This
+         * assumes that lw_pool_name is the last member in lsm_wire.
          */
-        return memcmp(&m1->lsm_wire, &m2->lsm_wire, sizeof m1->lsm_wire);
+        if (m1->lsm_magic == LOV_MAGIC_V1 || m2->lsm_magic == LOV_MAGIC_V1)
+                 len -= LOV_MAXPOOLNAME;
+        return memcmp(&m1->lsm_wire, &m2->lsm_wire, len);
 }
 
 void lov_stripe_lock(struct lov_stripe_md *md);
diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h
index 8088f0d..35fdeb8 100644
--- a/lustre/include/obd_class.h
+++ b/lustre/include/obd_class.h
@@ -102,6 +102,7 @@ int obd_export_evict_by_uuid(struct obd_device *obd, char *uuid);
 int obd_zombie_impexp_init(void);
 void obd_zombie_impexp_stop(void);
 void obd_zombie_impexp_cull(void);
+void obd_zombie_barrier(void);
 
 /* obd_config.c */
 int class_process_config(struct lustre_cfg *lcfg);
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-i686-smp.config
similarity index 98%
copy from lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config
copy to lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-i686-smp.config
index 97328b8..c86ff16 100644
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config
+++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-i686-smp.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 12:00:56 2009
+# Mon Aug 31 05:06:09 2009
 #
 CONFIG_X86_32=y
 CONFIG_GENERIC_TIME=y
@@ -47,7 +47,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_UID16=y
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -192,7 +192,8 @@ CONFIG_EDD=m
 CONFIG_EFI_VARS=y
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
-# CONFIG_ISCSI_IBFT_FIND is not set
+CONFIG_ISCSI_IBFT_FIND=y
+CONFIG_ISCSI_IBFT=m
 # CONFIG_NOHIGHMEM is not set
 CONFIG_HIGHMEM4G=y
 # CONFIG_HIGHMEM64G is not set
@@ -257,8 +258,7 @@ CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=y
 CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_IBM_BAY=y
+# CONFIG_ACPI_IBM is not set
 CONFIG_ACPI_TOSHIBA=m
 CONFIG_ACPI_BLACKLIST_YEAR=1999
 # CONFIG_ACPI_DEBUG is not set
@@ -309,10 +309,10 @@ CONFIG_X86_ACPI_CPUFREQ=m
 # CONFIG_X86_POWERNOW_K6 is not set
 CONFIG_X86_POWERNOW_K7=y
 CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=y
+CONFIG_X86_POWERNOW_K8=m
 CONFIG_X86_POWERNOW_K8_ACPI=y
 # CONFIG_X86_GX_SUSPMOD is not set
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
+CONFIG_X86_SPEEDSTEP_CENTRINO=m
 CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
 CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
 CONFIG_X86_SPEEDSTEP_ICH=y
@@ -498,7 +498,7 @@ CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
 CONFIG_IPV6_ROUTE_INFO=y
-# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_IPV6_OPTIMISTIC_DAD=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
@@ -840,14 +840,7 @@ CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_LEDS=y
 # CONFIG_MAC80211_DEBUGFS is not set
 # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_HT_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_DEBUG is not set
-# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set
-# CONFIG_TKIP_DEBUG is not set
-# CONFIG_MAC80211_DEBUG_COUNTERS is not set
-# CONFIG_MAC80211_IBSS_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
+# CONFIG_MAC80211_DEBUG is not set
 CONFIG_IEEE80211=m
 # CONFIG_IEEE80211_DEBUG is not set
 CONFIG_IEEE80211_CRYPT_WEP=m
@@ -1169,7 +1162,7 @@ CONFIG_SCSI_FC_ATTRS=m
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_ATA is not set
+CONFIG_SCSI_SAS_ATA=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
 
 #
@@ -1266,7 +1259,7 @@ CONFIG_SATA_ULI=m
 CONFIG_SATA_VIA=m
 CONFIG_SATA_VITESSE=m
 CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ACPI=m
+# CONFIG_PATA_ACPI is not set
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
@@ -1276,7 +1269,7 @@ CONFIG_PATA_ACPI=m
 # CONFIG_PATA_CS5520 is not set
 # CONFIG_PATA_CS5530 is not set
 # CONFIG_PATA_CS5535 is not set
-CONFIG_PATA_CS5536=m
+# CONFIG_PATA_CS5536 is not set
 # CONFIG_PATA_CYPRESS is not set
 # CONFIG_PATA_EFAR is not set
 # CONFIG_ATA_GENERIC is not set
@@ -1294,7 +1287,7 @@ CONFIG_PATA_MARVELL=m
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NINJA32 is not set
 # CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_NS87415=m
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PCMCIA is not set
@@ -1304,7 +1297,7 @@ CONFIG_PATA_NS87415=m
 # CONFIG_PATA_SC1200 is not set
 # CONFIG_PATA_SERVERWORKS is not set
 CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
+CONFIG_PATA_SIL680=m
 CONFIG_PATA_SIS=m
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
@@ -1334,7 +1327,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 CONFIG_DM_MULTIPATH_RDAC=m
 CONFIG_DM_MULTIPATH_HP=m
 CONFIG_DM_RAID45=m
-# CONFIG_DM_UEVENT is not set
+CONFIG_DM_UEVENT=y
 
 #
 # Fusion MPT device support
@@ -1343,10 +1336,10 @@ CONFIG_FUSION=y
 CONFIG_FUSION_SPI=m
 CONFIG_FUSION_FC=m
 CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_LAN=m
-# CONFIG_FUSION_LOGGING is not set
+CONFIG_FUSION_LOGGING=y
 
 #
 # Enable only one of the two stacks, unless you know what you are doing
@@ -1458,7 +1451,8 @@ CONFIG_8139TOO_8129=y
 # CONFIG_8139_OLD_RX_RESET is not set
 CONFIG_SIS900=m
 CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
 CONFIG_TLAN=m
 CONFIG_VIA_RHINE=m
 CONFIG_VIA_RHINE_MMIO=y
@@ -1497,7 +1491,7 @@ CONFIG_QLA3XXX=m
 # Ethernet (10000 Mbit)
 #
 CONFIG_CHELSIO_T1=m
-# CONFIG_CHELSIO_T3 is not set
+CONFIG_CHELSIO_T3=m
 CONFIG_IXGBE=m
 CONFIG_IXGB=m
 CONFIG_IXGB_NAPI=y
@@ -1601,7 +1595,11 @@ CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
 # CONFIG_IWLAGN_LEDS is not set
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
-# CONFIG_IWL3945 is not set
+CONFIG_IWL3945=m
+# CONFIG_IWL3945_RFKILL is not set
+CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
+# CONFIG_IWL3945_LEDS is not set
+# CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
 CONFIG_RT2X00_LIB_PCI=m
@@ -1973,7 +1971,8 @@ CONFIG_PPDEV=m
 # IPMI
 #
 CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_PANIC_EVENT=y
+CONFIG_IPMI_PANIC_STRING=y
 CONFIG_IPMI_DEVICE_INTERFACE=m
 CONFIG_IPMI_SI=m
 CONFIG_IPMI_WATCHDOG=m
@@ -2000,7 +1999,7 @@ CONFIG_IBMASR=m
 # CONFIG_WAFER_WDT is not set
 CONFIG_I6300ESB_WDT=m
 CONFIG_I8XX_TCO=m
-CONFIG_HP_WATCHDOG=m
+# CONFIG_HP_WATCHDOG is not set
 # CONFIG_SC1200_WDT is not set
 # CONFIG_60XX_WDT is not set
 # CONFIG_SBC8360_WDT is not set
@@ -2076,8 +2075,12 @@ CONFIG_HPET=y
 # CONFIG_HPET_RTC_IRQ is not set
 # CONFIG_HPET_MMAP is not set
 CONFIG_HANGCHECK_TIMER=m
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+CONFIG_TCG_INFINEON=m
+CONFIG_TELCLOCK=m
 
 #
 # I2C support
@@ -2318,7 +2321,7 @@ CONFIG_FB_CIRRUS=m
 # CONFIG_FB_IMSTT is not set
 CONFIG_FB_VGA16=m
 CONFIG_FB_VESA=y
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
 # CONFIG_FB_IMAC is not set
 # CONFIG_FB_HGA is not set
 # CONFIG_FB_S1D13XXX is not set
@@ -2959,8 +2962,9 @@ CONFIG_CIFS_WEAK_PW_HASH=y
 CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
 # CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
+CONFIG_CIFS_EXPERIMENTAL=y
 CONFIG_CIFS_UPCALL=y
+CONFIG_CIFS_DFS_UPCALL=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -3157,7 +3161,7 @@ CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_TEST=m
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_SIGNATURE=y
 CONFIG_CRYPTO_SIGNATURE_DSA=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-i686.config
similarity index 98%
copy from lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config
copy to lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-i686.config
index 97328b8..c86ff16 100644
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config
+++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-i686.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 12:00:56 2009
+# Mon Aug 31 05:06:09 2009
 #
 CONFIG_X86_32=y
 CONFIG_GENERIC_TIME=y
@@ -47,7 +47,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_UID16=y
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -192,7 +192,8 @@ CONFIG_EDD=m
 CONFIG_EFI_VARS=y
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
-# CONFIG_ISCSI_IBFT_FIND is not set
+CONFIG_ISCSI_IBFT_FIND=y
+CONFIG_ISCSI_IBFT=m
 # CONFIG_NOHIGHMEM is not set
 CONFIG_HIGHMEM4G=y
 # CONFIG_HIGHMEM64G is not set
@@ -257,8 +258,7 @@ CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=y
 CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_IBM_BAY=y
+# CONFIG_ACPI_IBM is not set
 CONFIG_ACPI_TOSHIBA=m
 CONFIG_ACPI_BLACKLIST_YEAR=1999
 # CONFIG_ACPI_DEBUG is not set
@@ -309,10 +309,10 @@ CONFIG_X86_ACPI_CPUFREQ=m
 # CONFIG_X86_POWERNOW_K6 is not set
 CONFIG_X86_POWERNOW_K7=y
 CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=y
+CONFIG_X86_POWERNOW_K8=m
 CONFIG_X86_POWERNOW_K8_ACPI=y
 # CONFIG_X86_GX_SUSPMOD is not set
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
+CONFIG_X86_SPEEDSTEP_CENTRINO=m
 CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
 CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
 CONFIG_X86_SPEEDSTEP_ICH=y
@@ -498,7 +498,7 @@ CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
 CONFIG_IPV6_ROUTE_INFO=y
-# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_IPV6_OPTIMISTIC_DAD=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
@@ -840,14 +840,7 @@ CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_LEDS=y
 # CONFIG_MAC80211_DEBUGFS is not set
 # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_HT_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_DEBUG is not set
-# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set
-# CONFIG_TKIP_DEBUG is not set
-# CONFIG_MAC80211_DEBUG_COUNTERS is not set
-# CONFIG_MAC80211_IBSS_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
+# CONFIG_MAC80211_DEBUG is not set
 CONFIG_IEEE80211=m
 # CONFIG_IEEE80211_DEBUG is not set
 CONFIG_IEEE80211_CRYPT_WEP=m
@@ -1169,7 +1162,7 @@ CONFIG_SCSI_FC_ATTRS=m
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_ATA is not set
+CONFIG_SCSI_SAS_ATA=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
 
 #
@@ -1266,7 +1259,7 @@ CONFIG_SATA_ULI=m
 CONFIG_SATA_VIA=m
 CONFIG_SATA_VITESSE=m
 CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ACPI=m
+# CONFIG_PATA_ACPI is not set
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
@@ -1276,7 +1269,7 @@ CONFIG_PATA_ACPI=m
 # CONFIG_PATA_CS5520 is not set
 # CONFIG_PATA_CS5530 is not set
 # CONFIG_PATA_CS5535 is not set
-CONFIG_PATA_CS5536=m
+# CONFIG_PATA_CS5536 is not set
 # CONFIG_PATA_CYPRESS is not set
 # CONFIG_PATA_EFAR is not set
 # CONFIG_ATA_GENERIC is not set
@@ -1294,7 +1287,7 @@ CONFIG_PATA_MARVELL=m
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NINJA32 is not set
 # CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_NS87415=m
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PCMCIA is not set
@@ -1304,7 +1297,7 @@ CONFIG_PATA_NS87415=m
 # CONFIG_PATA_SC1200 is not set
 # CONFIG_PATA_SERVERWORKS is not set
 CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
+CONFIG_PATA_SIL680=m
 CONFIG_PATA_SIS=m
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
@@ -1334,7 +1327,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 CONFIG_DM_MULTIPATH_RDAC=m
 CONFIG_DM_MULTIPATH_HP=m
 CONFIG_DM_RAID45=m
-# CONFIG_DM_UEVENT is not set
+CONFIG_DM_UEVENT=y
 
 #
 # Fusion MPT device support
@@ -1343,10 +1336,10 @@ CONFIG_FUSION=y
 CONFIG_FUSION_SPI=m
 CONFIG_FUSION_FC=m
 CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_LAN=m
-# CONFIG_FUSION_LOGGING is not set
+CONFIG_FUSION_LOGGING=y
 
 #
 # Enable only one of the two stacks, unless you know what you are doing
@@ -1458,7 +1451,8 @@ CONFIG_8139TOO_8129=y
 # CONFIG_8139_OLD_RX_RESET is not set
 CONFIG_SIS900=m
 CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
 CONFIG_TLAN=m
 CONFIG_VIA_RHINE=m
 CONFIG_VIA_RHINE_MMIO=y
@@ -1497,7 +1491,7 @@ CONFIG_QLA3XXX=m
 # Ethernet (10000 Mbit)
 #
 CONFIG_CHELSIO_T1=m
-# CONFIG_CHELSIO_T3 is not set
+CONFIG_CHELSIO_T3=m
 CONFIG_IXGBE=m
 CONFIG_IXGB=m
 CONFIG_IXGB_NAPI=y
@@ -1601,7 +1595,11 @@ CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
 # CONFIG_IWLAGN_LEDS is not set
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
-# CONFIG_IWL3945 is not set
+CONFIG_IWL3945=m
+# CONFIG_IWL3945_RFKILL is not set
+CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
+# CONFIG_IWL3945_LEDS is not set
+# CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
 CONFIG_RT2X00_LIB_PCI=m
@@ -1973,7 +1971,8 @@ CONFIG_PPDEV=m
 # IPMI
 #
 CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_PANIC_EVENT=y
+CONFIG_IPMI_PANIC_STRING=y
 CONFIG_IPMI_DEVICE_INTERFACE=m
 CONFIG_IPMI_SI=m
 CONFIG_IPMI_WATCHDOG=m
@@ -2000,7 +1999,7 @@ CONFIG_IBMASR=m
 # CONFIG_WAFER_WDT is not set
 CONFIG_I6300ESB_WDT=m
 CONFIG_I8XX_TCO=m
-CONFIG_HP_WATCHDOG=m
+# CONFIG_HP_WATCHDOG is not set
 # CONFIG_SC1200_WDT is not set
 # CONFIG_60XX_WDT is not set
 # CONFIG_SBC8360_WDT is not set
@@ -2076,8 +2075,12 @@ CONFIG_HPET=y
 # CONFIG_HPET_RTC_IRQ is not set
 # CONFIG_HPET_MMAP is not set
 CONFIG_HANGCHECK_TIMER=m
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+CONFIG_TCG_INFINEON=m
+CONFIG_TELCLOCK=m
 
 #
 # I2C support
@@ -2318,7 +2321,7 @@ CONFIG_FB_CIRRUS=m
 # CONFIG_FB_IMSTT is not set
 CONFIG_FB_VGA16=m
 CONFIG_FB_VESA=y
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
 # CONFIG_FB_IMAC is not set
 # CONFIG_FB_HGA is not set
 # CONFIG_FB_S1D13XXX is not set
@@ -2959,8 +2962,9 @@ CONFIG_CIFS_WEAK_PW_HASH=y
 CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
 # CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
+CONFIG_CIFS_EXPERIMENTAL=y
 CONFIG_CIFS_UPCALL=y
+CONFIG_CIFS_DFS_UPCALL=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -3157,7 +3161,7 @@ CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_TEST=m
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_SIGNATURE=y
 CONFIG_CRYPTO_SIGNATURE_DSA=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-ia64-smp.config
similarity index 98%
copy from lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config
copy to lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-ia64-smp.config
index a272203..0c8934a 100644
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config
+++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-ia64-smp.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 12:02:35 2009
+# Mon Aug 31 05:15:27 2009
 #
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -34,7 +34,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -170,7 +170,7 @@ CONFIG_IA64_MCA_RECOVERY=m
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
 CONFIG_SGI_SN=y
-# CONFIG_IA64_HP_AML_NFW is not set
+CONFIG_IA64_HP_AML_NFW=y
 
 #
 # SN Devices
@@ -380,7 +380,7 @@ CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
 CONFIG_IPV6_ROUTE_INFO=y
-# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_IPV6_OPTIMISTIC_DAD=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
@@ -722,16 +722,9 @@ CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_LEDS=y
 # CONFIG_MAC80211_DEBUGFS is not set
 # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_HT_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_DEBUG is not set
-# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set
-# CONFIG_TKIP_DEBUG is not set
-# CONFIG_MAC80211_DEBUG_COUNTERS is not set
-# CONFIG_MAC80211_IBSS_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
+# CONFIG_MAC80211_DEBUG is not set
 CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_DEBUG=y
 CONFIG_IEEE80211_CRYPT_WEP=m
 CONFIG_IEEE80211_CRYPT_CCMP=m
 CONFIG_IEEE80211_CRYPT_TKIP=m
@@ -943,7 +936,7 @@ CONFIG_SCSI_FC_ATTRS=m
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_ATA is not set
+CONFIG_SCSI_SAS_ATA=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
 
 #
@@ -1032,7 +1025,7 @@ CONFIG_SATA_ULI=m
 CONFIG_SATA_VIA=m
 CONFIG_SATA_VITESSE=m
 CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ACPI=m
+# CONFIG_PATA_ACPI is not set
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
@@ -1058,7 +1051,7 @@ CONFIG_PATA_MARVELL=m
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NINJA32 is not set
 # CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_NS87415=m
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PCMCIA is not set
@@ -1068,7 +1061,7 @@ CONFIG_PATA_NS87415=m
 # CONFIG_PATA_SC1200 is not set
 # CONFIG_PATA_SERVERWORKS is not set
 CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
+CONFIG_PATA_SIL680=m
 CONFIG_PATA_SIS=m
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
@@ -1098,7 +1091,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 CONFIG_DM_MULTIPATH_RDAC=m
 CONFIG_DM_MULTIPATH_HP=m
 CONFIG_DM_RAID45=m
-# CONFIG_DM_UEVENT is not set
+CONFIG_DM_UEVENT=y
 
 #
 # Fusion MPT device support
@@ -1107,10 +1100,10 @@ CONFIG_FUSION=y
 CONFIG_FUSION_SPI=m
 CONFIG_FUSION_FC=m
 CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_LAN=m
-# CONFIG_FUSION_LOGGING is not set
+CONFIG_FUSION_LOGGING=y
 
 #
 # Enable only one of the two stacks, unless you know what you are doing
@@ -1214,7 +1207,8 @@ CONFIG_8139TOO_8129=y
 # CONFIG_8139_OLD_RX_RESET is not set
 CONFIG_SIS900=m
 CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
 CONFIG_VIA_RHINE=m
 CONFIG_VIA_RHINE_MMIO=y
 CONFIG_VIA_RHINE_NAPI=y
@@ -1251,7 +1245,7 @@ CONFIG_QLA3XXX=m
 # Ethernet (10000 Mbit)
 #
 CONFIG_CHELSIO_T1=m
-# CONFIG_CHELSIO_T3 is not set
+CONFIG_CHELSIO_T3=m
 CONFIG_IXGBE=m
 CONFIG_IXGB=m
 CONFIG_IXGB_NAPI=y
@@ -1340,7 +1334,11 @@ CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
 # CONFIG_IWLAGN_LEDS is not set
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
-# CONFIG_IWL3945 is not set
+CONFIG_IWL3945=m
+# CONFIG_IWL3945_RFKILL is not set
+CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
+# CONFIG_IWL3945_LEDS is not set
+# CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
 CONFIG_RT2X00_LIB_PCI=m
@@ -1701,7 +1699,8 @@ CONFIG_PPDEV=m
 # IPMI
 #
 CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_PANIC_EVENT=y
+CONFIG_IPMI_PANIC_STRING=y
 CONFIG_IPMI_DEVICE_INTERFACE=m
 CONFIG_IPMI_SI=m
 CONFIG_IPMI_WATCHDOG=m
@@ -1765,8 +1764,12 @@ CONFIG_MAX_RAW_DEVS=8192
 # CONFIG_HPET is not set
 CONFIG_HANGCHECK_TIMER=m
 CONFIG_MMTIMER=y
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+# CONFIG_TCG_INFINEON is not set
+CONFIG_TELCLOCK=m
 
 #
 # I2C support
@@ -1791,7 +1794,7 @@ CONFIG_I2C_ALGOPCA=m
 # CONFIG_I2C_AMD8111 is not set
 # CONFIG_I2C_I801 is not set
 # CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_PIIX4=m
 CONFIG_I2C_ISA=m
 CONFIG_I2C_NFORCE2=m
 # CONFIG_I2C_OCORES is not set
@@ -2595,8 +2598,9 @@ CONFIG_CIFS_WEAK_PW_HASH=y
 CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
 # CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
+CONFIG_CIFS_EXPERIMENTAL=y
 CONFIG_CIFS_UPCALL=y
+CONFIG_CIFS_DFS_UPCALL=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -2810,7 +2814,7 @@ CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_TEST=m
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_SIGNATURE=y
 CONFIG_CRYPTO_SIGNATURE_DSA=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-ia64.config
similarity index 98%
copy from lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config
copy to lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-ia64.config
index a272203..0c8934a 100644
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config
+++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-ia64.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 12:02:35 2009
+# Mon Aug 31 05:15:27 2009
 #
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -34,7 +34,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -170,7 +170,7 @@ CONFIG_IA64_MCA_RECOVERY=m
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
 CONFIG_SGI_SN=y
-# CONFIG_IA64_HP_AML_NFW is not set
+CONFIG_IA64_HP_AML_NFW=y
 
 #
 # SN Devices
@@ -380,7 +380,7 @@ CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
 CONFIG_IPV6_ROUTE_INFO=y
-# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_IPV6_OPTIMISTIC_DAD=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
@@ -722,16 +722,9 @@ CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_LEDS=y
 # CONFIG_MAC80211_DEBUGFS is not set
 # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_HT_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_DEBUG is not set
-# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set
-# CONFIG_TKIP_DEBUG is not set
-# CONFIG_MAC80211_DEBUG_COUNTERS is not set
-# CONFIG_MAC80211_IBSS_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
+# CONFIG_MAC80211_DEBUG is not set
 CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_DEBUG=y
 CONFIG_IEEE80211_CRYPT_WEP=m
 CONFIG_IEEE80211_CRYPT_CCMP=m
 CONFIG_IEEE80211_CRYPT_TKIP=m
@@ -943,7 +936,7 @@ CONFIG_SCSI_FC_ATTRS=m
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_ATA is not set
+CONFIG_SCSI_SAS_ATA=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
 
 #
@@ -1032,7 +1025,7 @@ CONFIG_SATA_ULI=m
 CONFIG_SATA_VIA=m
 CONFIG_SATA_VITESSE=m
 CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ACPI=m
+# CONFIG_PATA_ACPI is not set
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
@@ -1058,7 +1051,7 @@ CONFIG_PATA_MARVELL=m
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NINJA32 is not set
 # CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_NS87415=m
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PCMCIA is not set
@@ -1068,7 +1061,7 @@ CONFIG_PATA_NS87415=m
 # CONFIG_PATA_SC1200 is not set
 # CONFIG_PATA_SERVERWORKS is not set
 CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
+CONFIG_PATA_SIL680=m
 CONFIG_PATA_SIS=m
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
@@ -1098,7 +1091,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 CONFIG_DM_MULTIPATH_RDAC=m
 CONFIG_DM_MULTIPATH_HP=m
 CONFIG_DM_RAID45=m
-# CONFIG_DM_UEVENT is not set
+CONFIG_DM_UEVENT=y
 
 #
 # Fusion MPT device support
@@ -1107,10 +1100,10 @@ CONFIG_FUSION=y
 CONFIG_FUSION_SPI=m
 CONFIG_FUSION_FC=m
 CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_LAN=m
-# CONFIG_FUSION_LOGGING is not set
+CONFIG_FUSION_LOGGING=y
 
 #
 # Enable only one of the two stacks, unless you know what you are doing
@@ -1214,7 +1207,8 @@ CONFIG_8139TOO_8129=y
 # CONFIG_8139_OLD_RX_RESET is not set
 CONFIG_SIS900=m
 CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
 CONFIG_VIA_RHINE=m
 CONFIG_VIA_RHINE_MMIO=y
 CONFIG_VIA_RHINE_NAPI=y
@@ -1251,7 +1245,7 @@ CONFIG_QLA3XXX=m
 # Ethernet (10000 Mbit)
 #
 CONFIG_CHELSIO_T1=m
-# CONFIG_CHELSIO_T3 is not set
+CONFIG_CHELSIO_T3=m
 CONFIG_IXGBE=m
 CONFIG_IXGB=m
 CONFIG_IXGB_NAPI=y
@@ -1340,7 +1334,11 @@ CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
 # CONFIG_IWLAGN_LEDS is not set
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
-# CONFIG_IWL3945 is not set
+CONFIG_IWL3945=m
+# CONFIG_IWL3945_RFKILL is not set
+CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
+# CONFIG_IWL3945_LEDS is not set
+# CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
 CONFIG_RT2X00_LIB_PCI=m
@@ -1701,7 +1699,8 @@ CONFIG_PPDEV=m
 # IPMI
 #
 CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_PANIC_EVENT=y
+CONFIG_IPMI_PANIC_STRING=y
 CONFIG_IPMI_DEVICE_INTERFACE=m
 CONFIG_IPMI_SI=m
 CONFIG_IPMI_WATCHDOG=m
@@ -1765,8 +1764,12 @@ CONFIG_MAX_RAW_DEVS=8192
 # CONFIG_HPET is not set
 CONFIG_HANGCHECK_TIMER=m
 CONFIG_MMTIMER=y
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+# CONFIG_TCG_INFINEON is not set
+CONFIG_TELCLOCK=m
 
 #
 # I2C support
@@ -1791,7 +1794,7 @@ CONFIG_I2C_ALGOPCA=m
 # CONFIG_I2C_AMD8111 is not set
 # CONFIG_I2C_I801 is not set
 # CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_PIIX4=m
 CONFIG_I2C_ISA=m
 CONFIG_I2C_NFORCE2=m
 # CONFIG_I2C_OCORES is not set
@@ -2595,8 +2598,9 @@ CONFIG_CIFS_WEAK_PW_HASH=y
 CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
 # CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
+CONFIG_CIFS_EXPERIMENTAL=y
 CONFIG_CIFS_UPCALL=y
+CONFIG_CIFS_DFS_UPCALL=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -2810,7 +2814,7 @@ CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_TEST=m
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_SIGNATURE=y
 CONFIG_CRYPTO_SIGNATURE_DSA=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-x86_64-smp.config
similarity index 99%
copy from lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config
copy to lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-x86_64-smp.config
index 1989337..bf7d400 100644
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config
+++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-x86_64-smp.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 11:53:40 2009
+# Mon Aug 31 05:11:08 2009
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -52,7 +52,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_UID16=y
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -1420,7 +1420,7 @@ CONFIG_QLA3XXX=m
 # Ethernet (10000 Mbit)
 #
 CONFIG_CHELSIO_T1=m
-# CONFIG_CHELSIO_T3 is not set
+CONFIG_CHELSIO_T3=m
 CONFIG_IXGBE=m
 CONFIG_IXGB=m
 CONFIG_IXGB_NAPI=y
@@ -2716,7 +2716,8 @@ CONFIG_INTEL_IOATDMA=m
 CONFIG_EDD=m
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
-# CONFIG_ISCSI_IBFT_FIND is not set
+CONFIG_ISCSI_IBFT_FIND=y
+CONFIG_ISCSI_IBFT=m
 
 #
 # File systems
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-x86_64.config
similarity index 99%
copy from lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config
copy to lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-x86_64.config
index 1989337..bf7d400 100644
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config
+++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-x86_64.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 11:53:40 2009
+# Mon Aug 31 05:11:08 2009
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -52,7 +52,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_UID16=y
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -1420,7 +1420,7 @@ CONFIG_QLA3XXX=m
 # Ethernet (10000 Mbit)
 #
 CONFIG_CHELSIO_T1=m
-# CONFIG_CHELSIO_T3 is not set
+CONFIG_CHELSIO_T3=m
 CONFIG_IXGBE=m
 CONFIG_IXGB=m
 CONFIG_IXGB_NAPI=y
@@ -2716,7 +2716,8 @@ CONFIG_INTEL_IOATDMA=m
 CONFIG_EDD=m
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
-# CONFIG_ISCSI_IBFT_FIND is not set
+CONFIG_ISCSI_IBFT_FIND=y
+CONFIG_ISCSI_IBFT=m
 
 #
 # File systems
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-i686-default.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-i686-default.config
index 81bc07f..0c89ce2 100644
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-i686-default.config
+++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-i686-default.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27.21
-# Wed May 13 22:15:21 2009
+# Linux kernel version: 2.6.27.29
+# Tue Sep  8 23:54:13 2009
 #
 # CONFIG_64BIT is not set
 CONFIG_X86_32=y
@@ -299,6 +299,7 @@ CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
 CONFIG_MMU_NOTIFIER=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
 CONFIG_HIGHPTE=y
 CONFIG_X86_RESERVE_LOW_64K=y
 # CONFIG_MATH_EMULATION is not set
@@ -3415,6 +3416,8 @@ CONFIG_SND_HDA_CODEC_SIGMATEL=y
 CONFIG_SND_HDA_CODEC_VIA=y
 CONFIG_SND_HDA_CODEC_ATIHDMI=y
 CONFIG_SND_HDA_CODEC_NVHDMI=y
+CONFIG_SND_HDA_CODEC_INTELHDMI=y
+CONFIG_SND_HDA_ELD=y
 CONFIG_SND_HDA_CODEC_CONEXANT=y
 CONFIG_SND_HDA_CODEC_CMEDIA=y
 CONFIG_SND_HDA_CODEC_SI3054=y
@@ -3873,7 +3876,11 @@ CONFIG_RT2870=m
 CONFIG_RT3070=m
 CONFIG_BENET=m
 CONFIG_RTL8187SE=m
-CONFIG_DRM_PSB=m
+CONFIG_RTL8192E=m
+CONFIG_HYPERV=m
+CONFIG_HYPERV_STORAGE=m
+CONFIG_HYPERV_BLOCK=m
+CONFIG_HYPERV_NET=m
 
 #
 # Firmware Drivers
@@ -3937,6 +3944,7 @@ CONFIG_OCFS2_FS_STATS=y
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
 # CONFIG_OCFS2_COMPAT_JBD is not set
+CONFIG_OCFS2_FS_POSIX_ACL=y
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -4150,7 +4158,7 @@ CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
 CONFIG_DLM=m
-# CONFIG_DLM_DEBUG is not set
+CONFIG_DLM_DEBUG=y
 
 #
 # Kernel hacking
@@ -4258,7 +4266,6 @@ CONFIG_SECURITY_DEFAULT="apparmor"
 CONFIG_SECURITY_NETWORK=y
 # CONFIG_SECURITY_NETWORK_XFRM is not set
 CONFIG_SECURITY_FILE_CAPABILITIES=y
-CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-i686.config
index 81bc07f..0c89ce2 100644
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-i686.config
+++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-i686.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27.21
-# Wed May 13 22:15:21 2009
+# Linux kernel version: 2.6.27.29
+# Tue Sep  8 23:54:13 2009
 #
 # CONFIG_64BIT is not set
 CONFIG_X86_32=y
@@ -299,6 +299,7 @@ CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
 CONFIG_MMU_NOTIFIER=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
 CONFIG_HIGHPTE=y
 CONFIG_X86_RESERVE_LOW_64K=y
 # CONFIG_MATH_EMULATION is not set
@@ -3415,6 +3416,8 @@ CONFIG_SND_HDA_CODEC_SIGMATEL=y
 CONFIG_SND_HDA_CODEC_VIA=y
 CONFIG_SND_HDA_CODEC_ATIHDMI=y
 CONFIG_SND_HDA_CODEC_NVHDMI=y
+CONFIG_SND_HDA_CODEC_INTELHDMI=y
+CONFIG_SND_HDA_ELD=y
 CONFIG_SND_HDA_CODEC_CONEXANT=y
 CONFIG_SND_HDA_CODEC_CMEDIA=y
 CONFIG_SND_HDA_CODEC_SI3054=y
@@ -3873,7 +3876,11 @@ CONFIG_RT2870=m
 CONFIG_RT3070=m
 CONFIG_BENET=m
 CONFIG_RTL8187SE=m
-CONFIG_DRM_PSB=m
+CONFIG_RTL8192E=m
+CONFIG_HYPERV=m
+CONFIG_HYPERV_STORAGE=m
+CONFIG_HYPERV_BLOCK=m
+CONFIG_HYPERV_NET=m
 
 #
 # Firmware Drivers
@@ -3937,6 +3944,7 @@ CONFIG_OCFS2_FS_STATS=y
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
 # CONFIG_OCFS2_COMPAT_JBD is not set
+CONFIG_OCFS2_FS_POSIX_ACL=y
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -4150,7 +4158,7 @@ CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
 CONFIG_DLM=m
-# CONFIG_DLM_DEBUG is not set
+CONFIG_DLM_DEBUG=y
 
 #
 # Kernel hacking
@@ -4258,7 +4266,6 @@ CONFIG_SECURITY_DEFAULT="apparmor"
 CONFIG_SECURITY_NETWORK=y
 # CONFIG_SECURITY_NETWORK_XFRM is not set
 CONFIG_SECURITY_FILE_CAPABILITIES=y
-CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-x86_64-default.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-x86_64-default.config
index 69bca9a..78a3868 100644
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-x86_64-default.config
+++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-x86_64-default.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27.21
-# Wed May 13 22:02:04 2009
+# Linux kernel version: 2.6.27.29
+# Tue Sep  8 23:55:10 2009
 #
 CONFIG_64BIT=y
 # CONFIG_X86_32 is not set
@@ -300,6 +300,7 @@ CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
 CONFIG_MMU_NOTIFIER=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
 CONFIG_X86_RESERVE_LOW_64K=y
 CONFIG_MTRR=y
 # CONFIG_MTRR_SANITIZER is not set
@@ -3169,6 +3170,8 @@ CONFIG_SND_HDA_CODEC_SIGMATEL=y
 CONFIG_SND_HDA_CODEC_VIA=y
 CONFIG_SND_HDA_CODEC_ATIHDMI=y
 CONFIG_SND_HDA_CODEC_NVHDMI=y
+CONFIG_SND_HDA_CODEC_INTELHDMI=y
+CONFIG_SND_HDA_ELD=y
 CONFIG_SND_HDA_CODEC_CONEXANT=y
 CONFIG_SND_HDA_CODEC_CMEDIA=y
 CONFIG_SND_HDA_CODEC_SI3054=y
@@ -3614,7 +3617,11 @@ CONFIG_RT2870=m
 CONFIG_RT3070=m
 CONFIG_BENET=m
 CONFIG_RTL8187SE=m
-CONFIG_DRM_PSB=m
+CONFIG_RTL8192E=m
+CONFIG_HYPERV=m
+CONFIG_HYPERV_STORAGE=m
+CONFIG_HYPERV_BLOCK=m
+CONFIG_HYPERV_NET=m
 
 #
 # Firmware Drivers
@@ -3679,6 +3686,7 @@ CONFIG_OCFS2_FS_STATS=y
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
 # CONFIG_OCFS2_COMPAT_JBD is not set
+CONFIG_OCFS2_FS_POSIX_ACL=y
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -3892,7 +3900,7 @@ CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
 CONFIG_DLM=m
-# CONFIG_DLM_DEBUG is not set
+CONFIG_DLM_DEBUG=y
 
 #
 # Kernel hacking
@@ -3998,7 +4006,6 @@ CONFIG_SECURITY_DEFAULT="apparmor"
 CONFIG_SECURITY_NETWORK=y
 # CONFIG_SECURITY_NETWORK_XFRM is not set
 CONFIG_SECURITY_FILE_CAPABILITIES=y
-CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-x86_64.config
index 69bca9a..78a3868 100644
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-x86_64.config
+++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.27-2.6-sles11-x86_64.config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27.21
-# Wed May 13 22:02:04 2009
+# Linux kernel version: 2.6.27.29
+# Tue Sep  8 23:55:10 2009
 #
 CONFIG_64BIT=y
 # CONFIG_X86_32 is not set
@@ -300,6 +300,7 @@ CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
 CONFIG_MMU_NOTIFIER=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
 CONFIG_X86_RESERVE_LOW_64K=y
 CONFIG_MTRR=y
 # CONFIG_MTRR_SANITIZER is not set
@@ -3169,6 +3170,8 @@ CONFIG_SND_HDA_CODEC_SIGMATEL=y
 CONFIG_SND_HDA_CODEC_VIA=y
 CONFIG_SND_HDA_CODEC_ATIHDMI=y
 CONFIG_SND_HDA_CODEC_NVHDMI=y
+CONFIG_SND_HDA_CODEC_INTELHDMI=y
+CONFIG_SND_HDA_ELD=y
 CONFIG_SND_HDA_CODEC_CONEXANT=y
 CONFIG_SND_HDA_CODEC_CMEDIA=y
 CONFIG_SND_HDA_CODEC_SI3054=y
@@ -3614,7 +3617,11 @@ CONFIG_RT2870=m
 CONFIG_RT3070=m
 CONFIG_BENET=m
 CONFIG_RTL8187SE=m
-CONFIG_DRM_PSB=m
+CONFIG_RTL8192E=m
+CONFIG_HYPERV=m
+CONFIG_HYPERV_STORAGE=m
+CONFIG_HYPERV_BLOCK=m
+CONFIG_HYPERV_NET=m
 
 #
 # Firmware Drivers
@@ -3679,6 +3686,7 @@ CONFIG_OCFS2_FS_STATS=y
 # CONFIG_OCFS2_DEBUG_MASKLOG is not set
 # CONFIG_OCFS2_DEBUG_FS is not set
 # CONFIG_OCFS2_COMPAT_JBD is not set
+CONFIG_OCFS2_FS_POSIX_ACL=y
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -3892,7 +3900,7 @@ CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
 CONFIG_DLM=m
-# CONFIG_DLM_DEBUG is not set
+CONFIG_DLM_DEBUG=y
 
 #
 # Kernel hacking
@@ -3998,7 +4006,6 @@ CONFIG_SECURITY_DEFAULT="apparmor"
 CONFIG_SECURITY_NETWORK=y
 # CONFIG_SECURITY_NETWORK_XFRM is not set
 CONFIG_SECURITY_FILE_CAPABILITIES=y
-CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
diff --git a/lustre/kernel_patches/patches/blkdev_tunables-2.6-rhel5.patch b/lustre/kernel_patches/patches/blkdev_tunables-2.6-rhel5.patch
new file mode 100644
index 0000000..84a0ecb
--- /dev/null
+++ b/lustre/kernel_patches/patches/blkdev_tunables-2.6-rhel5.patch
@@ -0,0 +1,11 @@
+--- linux-2.6.18-128.1.14.orig/include/linux/blkdev.h	2009-06-19 04:03:20.000000000 -0400
++++ linux-2.6.18-128.1.14/include/linux/blkdev.h	2009-09-04 16:31:30.000000000 -0400
+@@ -778,7 +778,7 @@ extern int blkdev_issue_flush(struct blo
+ #define MAX_PHYS_SEGMENTS 128
+ #define MAX_HW_SEGMENTS 128
+ #define SAFE_MAX_SECTORS 255
+-#define BLK_DEF_MAX_SECTORS 1024
++#define BLK_DEF_MAX_SECTORS 2048
+ 
+ #define MAX_SEGMENT_SIZE	65536
+ 
diff --git a/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles11.patch b/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles11.patch
new file mode 100644
index 0000000..dea7372
--- /dev/null
+++ b/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles11.patch
@@ -0,0 +1,11 @@
+--- linux-2.6.27.19-5.orig/include/linux/blkdev.h	2009-03-17 12:48:06.000000000 -0400
++++ linux-2.6.27.19-5/include/linux/blkdev.h	2009-09-04 18:04:43.000000000 -0400
+@@ -904,7 +904,7 @@ extern void blk_set_cmd_filter_defaults(
+ #define MAX_PHYS_SEGMENTS 128
+ #define MAX_HW_SEGMENTS 128
+ #define SAFE_MAX_SECTORS 255
+-#define BLK_DEF_MAX_SECTORS 1024
++#define BLK_DEF_MAX_SECTORS 2048
+ 
+ #define MAX_SEGMENT_SIZE	65536
+ 
diff --git a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch
index 1a6f326..fd11b39 100644
--- a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch
+++ b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch
@@ -38,7 +38,7 @@ Index: linux-2.6.16.53-0.16/fs/jbd/commit.c
  	int barrier_done = 0;
  
  	if (is_journal_aborted(journal))
-@@ -118,21 +123,35 @@ static int journal_write_commit_record(j
+@@ -118,21 +123,34 @@ static int journal_write_commit_record(j
  
  	bh = jh2bh(descriptor);
  
@@ -63,7 +63,6 @@ Index: linux-2.6.16.53-0.16/fs/jbd/commit.c
 -	JBUFFER_TRACE(descriptor, "write commit block");
 +	JBUFFER_TRACE(descriptor, "submit commit block");
 +	lock_buffer(bh);
-+	get_bh(bh);
 +
  	set_buffer_dirty(bh);
 -	if (journal->j_flags & JFS_BARRIER) {
diff --git a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch
index a132395..2e6865c 100644
--- a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch
+++ b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch
@@ -38,7 +38,7 @@ Index: linux-2.6.18-128.1.14/fs/jbd/commit.c
  	int barrier_done = 0;
  
  	if (is_journal_aborted(journal))
-@@ -119,21 +124,35 @@
+@@ -119,21 +124,34 @@
  
  	bh = jh2bh(descriptor);
  
@@ -63,7 +63,6 @@ Index: linux-2.6.18-128.1.14/fs/jbd/commit.c
 -	JBUFFER_TRACE(descriptor, "write commit block");
 +	JBUFFER_TRACE(descriptor, "submit commit block");
 +	lock_buffer(bh);
-+	get_bh(bh);
 +
  	set_buffer_dirty(bh);
 -	if (journal->j_flags & JFS_BARRIER) {
diff --git a/lustre/kernel_patches/patches/raid5-large-io-rhel5.patch b/lustre/kernel_patches/patches/raid5-large-io-rhel5.patch
index a415611..6a712a9 100644
--- a/lustre/kernel_patches/patches/raid5-large-io-rhel5.patch
+++ b/lustre/kernel_patches/patches/raid5-large-io-rhel5.patch
@@ -7,7 +7,7 @@ diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/rai
  
 +	/* in order to support large I/Os */
 +	blk_queue_max_sectors(mddev->queue, conf->chunk_size * conf->previous_raid_disks >> 9);
-+	mddev->queue->max_phys_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT;
++	mddev->queue->max_phys_segments = conf->chunk_size * (conf->previous_raid_disks - conf->max_degraded) >> PAGE_SHIFT;
 +	mddev->queue->max_hw_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT;;
 +
  	return 0;
diff --git a/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch b/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch
index e66bf54..deb8b60 100644
--- a/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch
+++ b/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch
@@ -382,9 +382,9 @@ Index: linux-2.6.18-128.1.14/include/linux/page-flags.h
 --- linux-2.6.18-128.1.14.orig/include/linux/page-flags.h	2009-06-19 12:33:11.000000000 -0600
 +++ linux-2.6.18-128.1.14/include/linux/page-flags.h	2009-06-19 12:34:50.000000000 -0600
 @@ -87,6 +87,7 @@
+ #define PG_reclaim		17	/* To be reclaimed asap */
  #define PG_nosave_free		18	/* Free, should not be written */
  #define PG_buddy		19	/* Page is free, on buddy lists */
- #define PG_gup			20	/* Page pin may be because of gup */
 +#define PG_constant		21	/* To mark if the page is constant */
  #define PG_xpmem		27	/* Testing for xpmem. */
  
diff --git a/lustre/kernel_patches/series/2.6-rhel5.series b/lustre/kernel_patches/series/2.6-rhel5.series
index 41f55fc..813b700 100644
--- a/lustre/kernel_patches/series/2.6-rhel5.series
+++ b/lustre/kernel_patches/series/2.6-rhel5.series
@@ -8,6 +8,7 @@ export-2.6.18-vanilla.patch
 export-show_task-2.6.18-vanilla.patch
 sd_iostats-2.6-rhel5.patch
 export_symbol_numa-2.6-fc5.patch
+blkdev_tunables-2.6-rhel5.patch
 jbd-stats-2.6-rhel5.patch
 raid5-stats-rhel5.patch
 raid5-configurable-cachesize-rhel5.patch
diff --git a/lustre/kernel_patches/series/2.6-sles11.series b/lustre/kernel_patches/series/2.6-sles11.series
index 860be33..61e48cd 100644
--- a/lustre/kernel_patches/series/2.6-sles11.series
+++ b/lustre/kernel_patches/series/2.6-sles11.series
@@ -7,6 +7,7 @@ dev_read_only-2.6.27-vanilla.patch
 export-2.6.27-vanilla.patch 
 export-show_task-2.6.27-vanilla.patch 
 sd_iostats-2.6.27-vanilla.patch
+blkdev_tunables-2.6-sles11.patch
 md-mmp-unplug-dev-sles11.patch
 quota-support-64-bit-quota-format.patch
 jbd2-jcberr-2.6-sles11.patch
diff --git a/lustre/kernel_patches/targets/2.6-fc5.target b/lustre/kernel_patches/targets/2.6-fc5.target
index 685f398..3d47cc3 100644
--- a/lustre/kernel_patches/targets/2.6-fc5.target
+++ b/lustre/kernel_patches/targets/2.6-fc5.target
@@ -4,10 +4,10 @@ lnxrel="fc5"
 KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2
 SERIES=2.6-fc5.series
 VERSION=${lnxmaj}
-EXTRA_VERSION=${lnxrel}_lustre.1.8.1
+EXTRA_VERSION=${lnxrel}_lustre.1.8.1.1
 RHBUILD=1
 LINUX26=1
-LUSTRE_VERSION=1.8.1
+LUSTRE_VERSION=1.8.1.1
 
 BASE_ARCHS="i686"
 BIGMEM_ARCHS=""
diff --git a/lustre/kernel_patches/targets/2.6-rhel5.target b/lustre/kernel_patches/targets/2.6-oel5.target
similarity index 82%
copy from lustre/kernel_patches/targets/2.6-rhel5.target
copy to lustre/kernel_patches/targets/2.6-oel5.target
index 36f0a0a..636baaf 100644
--- a/lustre/kernel_patches/targets/2.6-rhel5.target
+++ b/lustre/kernel_patches/targets/2.6-oel5.target
@@ -1,10 +1,10 @@
 lnxmaj="2.6.18"
-lnxrel="128.1.14.el5"
+lnxrel="128.7.1.0.1.el5"
 
 KERNEL_SRPM=kernel-$lnxmaj-$lnxrel.src.rpm
 SERIES=2.6-rhel5.series
-EXTRA_VERSION=${lnxrel}_lustre.1.8.1
-LUSTRE_VERSION=1.8.1
+EXTRA_VERSION=${lnxrel}_lustre.1.8.1.1
+LUSTRE_VERSION=1.8.1.1
 
 OFED_VERSION=1.4.1
 
diff --git a/lustre/kernel_patches/targets/2.6-rhel5.target.in b/lustre/kernel_patches/targets/2.6-oel5.target.in
similarity index 94%
copy from lustre/kernel_patches/targets/2.6-rhel5.target.in
copy to lustre/kernel_patches/targets/2.6-oel5.target.in
index a1fbdf3..3d85eac 100644
--- a/lustre/kernel_patches/targets/2.6-rhel5.target.in
+++ b/lustre/kernel_patches/targets/2.6-oel5.target.in
@@ -1,5 +1,5 @@
 lnxmaj="2.6.18"
-lnxrel="128.1.14.el5"
+lnxrel="128.7.1.0.1.el5"
 
 KERNEL_SRPM=kernel-$lnxmaj-$lnxrel.src.rpm
 SERIES=2.6-rhel5.series
diff --git a/lustre/kernel_patches/targets/2.6-patchless.target b/lustre/kernel_patches/targets/2.6-patchless.target
index 610b642..f408f85 100644
--- a/lustre/kernel_patches/targets/2.6-patchless.target
+++ b/lustre/kernel_patches/targets/2.6-patchless.target
@@ -7,7 +7,7 @@ VERSION=${lnxmaj}
 EXTRA_VERSION=${lnxrel}
 RHBUILD=1
 LINUX26=1
-LUSTRE_VERSION=1.8.1
+LUSTRE_VERSION=1.8.1.1
 
 BASE_ARCHS="i686 x86_64 ia64"
 BIGMEM_ARCHS=""
diff --git a/lustre/kernel_patches/targets/2.6-rhel4.target b/lustre/kernel_patches/targets/2.6-rhel4.target
index 78758d6..e0b38de 100644
--- a/lustre/kernel_patches/targets/2.6-rhel4.target
+++ b/lustre/kernel_patches/targets/2.6-rhel4.target
@@ -4,12 +4,12 @@ lnxrel="67.0.22.EL"
 KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2
 SERIES=2.6-rhel4.series
 VERSION=${lnxmaj}
-EXTRA_VERSION=${lnxrel}_lustre.1.8.1
+EXTRA_VERSION=${lnxrel}_lustre.1.8.1.1
 RHBUILD=1
 LINUX26=1
-LUSTRE_VERSION=1.8.1
+LUSTRE_VERSION=1.8.1.1
 
-OFED_VERSION=1.4.1
+OFED_VERSION=1.4.2
 
 BASE_ARCHS="i686 x86_64 ia64"
 BIGMEM_ARCHS=""
diff --git a/lustre/kernel_patches/targets/2.6-rhel4.target.in b/lustre/kernel_patches/targets/2.6-rhel4.target.in
index 187cdea..d53d003 100644
--- a/lustre/kernel_patches/targets/2.6-rhel4.target.in
+++ b/lustre/kernel_patches/targets/2.6-rhel4.target.in
@@ -9,7 +9,7 @@ RHBUILD=1
 LINUX26=1
 LUSTRE_VERSION=@VERSION@
 
-OFED_VERSION=1.4.1
+OFED_VERSION=1.4.2
 
 BASE_ARCHS="i686 x86_64 ia64"
 BIGMEM_ARCHS=""
diff --git a/lustre/kernel_patches/targets/2.6-rhel5.target b/lustre/kernel_patches/targets/2.6-rhel5.target
index 36f0a0a..46d7e9c 100644
--- a/lustre/kernel_patches/targets/2.6-rhel5.target
+++ b/lustre/kernel_patches/targets/2.6-rhel5.target
@@ -1,12 +1,12 @@
 lnxmaj="2.6.18"
-lnxrel="128.1.14.el5"
+lnxrel="128.7.1.el5"
 
 KERNEL_SRPM=kernel-$lnxmaj-$lnxrel.src.rpm
 SERIES=2.6-rhel5.series
-EXTRA_VERSION=${lnxrel}_lustre.1.8.1
-LUSTRE_VERSION=1.8.1
+EXTRA_VERSION=${lnxrel}_lustre.1.8.1.1
+LUSTRE_VERSION=1.8.1.1
 
-OFED_VERSION=1.4.1
+OFED_VERSION=1.4.2
 
 BASE_ARCHS="i686 x86_64 ia64 ppc64"
 BIGMEM_ARCHS=""
diff --git a/lustre/kernel_patches/targets/2.6-rhel5.target.in b/lustre/kernel_patches/targets/2.6-rhel5.target.in
index a1fbdf3..a21e014 100644
--- a/lustre/kernel_patches/targets/2.6-rhel5.target.in
+++ b/lustre/kernel_patches/targets/2.6-rhel5.target.in
@@ -1,12 +1,12 @@
 lnxmaj="2.6.18"
-lnxrel="128.1.14.el5"
+lnxrel="128.7.1.el5"
 
 KERNEL_SRPM=kernel-$lnxmaj-$lnxrel.src.rpm
 SERIES=2.6-rhel5.series
 EXTRA_VERSION=${lnxrel}_lustre. at VERSION@
 LUSTRE_VERSION=@VERSION@
 
-OFED_VERSION=1.4.1
+OFED_VERSION=1.4.2
 
 BASE_ARCHS="i686 x86_64 ia64 ppc64"
 BIGMEM_ARCHS=""
diff --git a/lustre/kernel_patches/targets/2.6-sles10.target b/lustre/kernel_patches/targets/2.6-sles10.target
index 383bdaf..024cf06 100644
--- a/lustre/kernel_patches/targets/2.6-sles10.target
+++ b/lustre/kernel_patches/targets/2.6-sles10.target
@@ -3,7 +3,7 @@ lnxmin=".60"
 # when we fix up this lnxmaj/lnxmin/lnxrel business...
 #lnxrel="0.37_f594963d"
 # and note that this means we get rid of the EXTRA_VERSION_DELIMITER crap!!
-lnxrel="60-0.39.3"
+lnxrel="60-0.42.4"
 
 # this is the delimeter that goes between $lnxmaj and $lnxrel
 # defaults to "-"
@@ -16,10 +16,10 @@ TARGET_DELIMITER="-"
 KERNEL_SRPM=kernel-source-$lnxmaj.$lnxrel.src.rpm
 SERIES=2.6-sles10.series
 VERSION=$lnxmaj
-EXTRA_VERSION="${lnxrel}_lustre.1.8.1"
-LUSTRE_VERSION=1.8.1
+EXTRA_VERSION="${lnxrel}_lustre.1.8.1.1"
+LUSTRE_VERSION=1.8.1.1
 
-OFED_VERSION=1.4.1
+OFED_VERSION=1.4.2
 
 BASE_ARCHS="i686 ppc x86_64 ia64 ppc64"
 BIGMEM_ARCHS=""
diff --git a/lustre/kernel_patches/targets/2.6-sles10.target.in b/lustre/kernel_patches/targets/2.6-sles10.target.in
index 120fca2..d44bea3 100644
--- a/lustre/kernel_patches/targets/2.6-sles10.target.in
+++ b/lustre/kernel_patches/targets/2.6-sles10.target.in
@@ -3,7 +3,7 @@ lnxmin=".60"
 # when we fix up this lnxmaj/lnxmin/lnxrel business...
 #lnxrel="0.37_f594963d"
 # and note that this means we get rid of the EXTRA_VERSION_DELIMITER crap!!
-lnxrel="60-0.39.3"
+lnxrel="60-0.42.4"
 
 # this is the delimeter that goes between $lnxmaj and $lnxrel
 # defaults to "-"
@@ -19,7 +19,7 @@ VERSION=$lnxmaj
 EXTRA_VERSION="${lnxrel}_lustre. at VERSION@"
 LUSTRE_VERSION=@VERSION@
 
-OFED_VERSION=1.4.1
+OFED_VERSION=1.4.2
 
 BASE_ARCHS="i686 ppc x86_64 ia64 ppc64"
 BIGMEM_ARCHS=""
diff --git a/lustre/kernel_patches/targets/2.6-sles11.target b/lustre/kernel_patches/targets/2.6-sles11.target
index 0194a51..54ef1b0 100644
--- a/lustre/kernel_patches/targets/2.6-sles11.target
+++ b/lustre/kernel_patches/targets/2.6-sles11.target
@@ -1,9 +1,9 @@
 lnxmaj="2.6.27"
-lnxmin=".23"
+lnxmin=".29"
 # when we fix up this lnxmaj/lnxmin/lnxrel business...
 #lnxrel="0.37_f594963d"
 # and note that this means we get rid of the EXTRA_VERSION_DELIMITER crap!!
-lnxrel="23-0.1"
+lnxrel="29-0.1"
 
 # this is the delimeter that goes between $lnxmaj and $lnxrel
 # defaults to "-"
@@ -16,10 +16,10 @@ TARGET_DELIMITER="-"
 KERNEL_SRPM=kernel-source-$lnxmaj.$lnxrel.1.src.rpm
 SERIES=2.6-sles11.series
 VERSION=$lnxmaj
-EXTRA_VERSION="${lnxrel}_lustre.1.8.1"
-LUSTRE_VERSION=1.8.1
+EXTRA_VERSION="${lnxrel}_lustre.1.8.1.1"
+LUSTRE_VERSION=1.8.1.1
 
-OFED_VERSION=1.4.1
+OFED_VERSION=1.4.2
 
 BASE_ARCHS="i686 ppc x86_64 ia64 ppc64"
 BIGMEM_ARCHS=""
diff --git a/lustre/kernel_patches/targets/2.6-sles11.target.in b/lustre/kernel_patches/targets/2.6-sles11.target.in
index 5080070..7c5e145 100644
--- a/lustre/kernel_patches/targets/2.6-sles11.target.in
+++ b/lustre/kernel_patches/targets/2.6-sles11.target.in
@@ -1,9 +1,9 @@
 lnxmaj="2.6.27"
-lnxmin=".23"
+lnxmin=".29"
 # when we fix up this lnxmaj/lnxmin/lnxrel business...
 #lnxrel="0.37_f594963d"
 # and note that this means we get rid of the EXTRA_VERSION_DELIMITER crap!!
-lnxrel="23-0.1"
+lnxrel="29-0.1"
 
 # this is the delimeter that goes between $lnxmaj and $lnxrel
 # defaults to "-"
@@ -19,7 +19,7 @@ VERSION=$lnxmaj
 EXTRA_VERSION="${lnxrel}_lustre. at VERSION@"
 LUSTRE_VERSION=@VERSION@
 
-OFED_VERSION=1.4.1
+OFED_VERSION=1.4.2
 
 BASE_ARCHS="i686 ppc x86_64 ia64 ppc64"
 BIGMEM_ARCHS=""
diff --git a/lustre/kernel_patches/targets/2.6-suse.target b/lustre/kernel_patches/targets/2.6-suse.target
index 5cf206a..e241518 100644
--- a/lustre/kernel_patches/targets/2.6-suse.target
+++ b/lustre/kernel_patches/targets/2.6-suse.target
@@ -5,8 +5,8 @@ KERNEL=linux-$lnxmaj-$lnxrel.tar.bz2
 # they include our patches
 SERIES=2.6-suse-newer.series
 VERSION=$lnxmaj
-EXTRA_VERSION="${lnxrel}_lustre.1.8.1"
-LUSTRE_VERSION=1.8.1
+EXTRA_VERSION="${lnxrel}_lustre.1.8.1.1"
+LUSTRE_VERSION=1.8.1.1
 RHBUILD=0
 LINUX26=1
 SUSEBUILD=1
diff --git a/lustre/kernel_patches/targets/2.6-vanilla.target b/lustre/kernel_patches/targets/2.6-vanilla.target
index db7ec0a..08eae35 100644
--- a/lustre/kernel_patches/targets/2.6-vanilla.target
+++ b/lustre/kernel_patches/targets/2.6-vanilla.target
@@ -12,8 +12,8 @@ TARGET_DELIMITER="-"
 KERNEL=linux-$lnxmaj.$lnxrel.tar.bz2
 SERIES=2.6.22-vanilla.series
 VERSION=$lnxmaj
-EXTRA_VERSION="${lnxrel}_lustre.1.8.1"
-LUSTRE_VERSION=1.8.1
+EXTRA_VERSION="${lnxrel}_lustre.1.8.1.1"
+LUSTRE_VERSION=1.8.1.1
 RHBUILD=0
 LINUX26=1
 # No /boot/Kerntypes* in SLES10
diff --git a/lustre/kernel_patches/targets/hp_pnnl-2.4.target b/lustre/kernel_patches/targets/hp_pnnl-2.4.target
index 7436e93..055cc20 100644
--- a/lustre/kernel_patches/targets/hp_pnnl-2.4.target
+++ b/lustre/kernel_patches/targets/hp_pnnl-2.4.target
@@ -4,8 +4,8 @@ lnxrel=hp_pnnl
 KERNEL=linux-$lnxmaj-$lnxrel.tar.gz
 SERIES=hp-pnnl-2.4.20
 VERSION=$lnxmaj
-EXTRA_VERSION=$lnxrel_lustre.1.8.1
-LUSTRE_VERSION=1.8.1
+EXTRA_VERSION=$lnxrel_lustre.1.8.1.1
+LUSTRE_VERSION=1.8.1.1
 RHBUILD=0
 
 BASE_ARCHS="ia64"
diff --git a/lustre/kernel_patches/targets/rh-2.4.target b/lustre/kernel_patches/targets/rh-2.4.target
index 3d69c3b..25965f7 100644
--- a/lustre/kernel_patches/targets/rh-2.4.target
+++ b/lustre/kernel_patches/targets/rh-2.4.target
@@ -4,8 +4,8 @@ lnxrel="31.9"
 KERNEL=linux-${lnxmaj}-${lnxrel}.tar.gz
 SERIES=rh-2.4.20
 VERSION=$lnxmaj
-EXTRA_VERSION=${lnxrel}_lustre.1.8.1
-LUSTRE_VERSION=1.8.1
+EXTRA_VERSION=${lnxrel}_lustre.1.8.1.1
+LUSTRE_VERSION=1.8.1.1
 RHBUILD=1
 
 BASE_ARCHS="i686"
diff --git a/lustre/kernel_patches/targets/rhel-2.4.target b/lustre/kernel_patches/targets/rhel-2.4.target
index 79a5fcc..17d2cc5 100644
--- a/lustre/kernel_patches/targets/rhel-2.4.target
+++ b/lustre/kernel_patches/targets/rhel-2.4.target
@@ -4,8 +4,8 @@ lnxrel="47.0.1.EL"
 KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2
 SERIES=rhel-2.4.21
 VERSION=${lnxmaj}
-LUSTRE_VERSION=1.8.1
-EXTRA_VERSION=${lnxrel}_lustre.1.8.1
+LUSTRE_VERSION=1.8.1.1
+EXTRA_VERSION=${lnxrel}_lustre.1.8.1.1
 RHBUILD=1
 
 BASE_ARCHS="i686 x86_64 ia64"
diff --git a/lustre/kernel_patches/targets/sles-2.4.target b/lustre/kernel_patches/targets/sles-2.4.target
index d320ac0..994a3d7 100644
--- a/lustre/kernel_patches/targets/sles-2.4.target
+++ b/lustre/kernel_patches/targets/sles-2.4.target
@@ -4,8 +4,8 @@ lnxrel="273"
 KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2
 SERIES=suse-2.4.21-jvn
 VERSION=${lnxmaj}
-EXTRA_VERSION=${lnxrel}_lustre.1.8.1
-LUSTRE_VERSION=1.8.1
+EXTRA_VERSION=${lnxrel}_lustre.1.8.1.1
+LUSTRE_VERSION=1.8.1.1
 RHBUILD=0
 LINUX26=0
 SUSEBUILD=1
diff --git a/lustre/kernel_patches/targets/suse-2.4.21-2.target b/lustre/kernel_patches/targets/suse-2.4.21-2.target
index 9c05e1f..6035bc9 100644
--- a/lustre/kernel_patches/targets/suse-2.4.21-2.target
+++ b/lustre/kernel_patches/targets/suse-2.4.21-2.target
@@ -1,8 +1,8 @@
 KERNEL=linux-2.4.21-x86_64.tar.gz
 SERIES=suse-2.4.21-2
 VERSION=2.4.21
-EXTRA_VERSION=lustre.1.8.1
-LUSTRE_VERSION=1.8.1
+EXTRA_VERSION=lustre.1.8.1.1
+LUSTRE_VERSION=1.8.1.1
 RHBUILD=0
 
 BASE_ARCHS="x86_64"
diff --git a/lustre/kernel_patches/which_patch b/lustre/kernel_patches/which_patch
index d3261ff..66d6bd4 100644
--- a/lustre/kernel_patches/which_patch
+++ b/lustre/kernel_patches/which_patch
@@ -1,9 +1,10 @@
 SERIES                VERSION                  COMMENT
 
 SUPPORTED KERNELS:
-2.6-sles10            SLES10: 2.6.16.60-0.39.3
-2.6-rhel5             RHEL5: 2.6.18-128.1.14.el5
-2.6-sles11            SLES11: 2.6.27.23-0.1
+2.6-sles10            SLES10: 2.6.16.60-0.42.4
+2.6-rhel5             RHEL5: 2.6.18-128.7.1.el5
+2.6-sles11            SLES11: 2.6.27.29-0.1
+2.6-oel5              OEL5: 2.6.18-128.7.1.el5
 
 CLIENT SUPPORT FOR UNPATCHED KERNELS:
                    kernel.org 2.6.16-2.6.27
diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c
index f6f842b..0e4f5e5 100644
--- a/lustre/ldlm/ldlm_lib.c
+++ b/lustre/ldlm/ldlm_lib.c
@@ -1192,6 +1192,9 @@ static void abort_recovery_queue(struct obd_device *obd)
                 else
                         DEBUG_REQ(D_ERROR, req,
                                   "packing failed for abort-reply; skipping");
+
+                LASSERT(req->rq_copy);
+                class_export_rpc_put(req->rq_export);
                 target_release_saved_req(req);
         }
 }
@@ -1238,6 +1241,9 @@ void target_cleanup_recovery(struct obd_device *obd)
                 req = list_entry(tmp, struct ptlrpc_request, rq_list);
                 target_exp_dequeue_req_replay(req);
                 list_del_init(&req->rq_list);
+                
+                LASSERT(req->rq_copy);
+                class_export_rpc_put(req->rq_export);
                 target_release_saved_req(req);
         }
         EXIT;
@@ -1496,6 +1502,10 @@ static void process_recovery_queue(struct obd_device *obd)
                 obd->obd_next_recovery_transno++;
                 spin_unlock_bh(&obd->obd_processing_task_lock);
                 target_exp_dequeue_req_replay(req);
+
+                LASSERT(req->rq_copy);
+                class_export_rpc_put(req->rq_export);
+
                 class_export_put(req->rq_export);
                 ptlrpc_req_drop_rs(req);
                 OBD_FREE(req->rq_reqmsg, req->rq_reqlen);
@@ -1519,7 +1529,7 @@ int target_queue_recovery_request(struct ptlrpc_request *req,
         struct list_head *tmp;
         int inserted = 0;
         __u64 transno = lustre_msg_get_transno(req->rq_reqmsg);
-        struct ptlrpc_request *saved_req;
+        struct ptlrpc_request *saved_req, *orig_req;
         struct lustre_msg *reqmsg;
         int rc = 0;
 
@@ -1569,6 +1579,7 @@ int target_queue_recovery_request(struct ptlrpc_request *req,
 
         memcpy(saved_req, req, sizeof *req);
         memcpy(reqmsg, req->rq_reqmsg, req->rq_reqlen);
+        orig_req = req;
         req = saved_req;
         req->rq_reqmsg = reqmsg;
         class_export_get(req->rq_export);
@@ -1607,6 +1618,8 @@ int target_queue_recovery_request(struct ptlrpc_request *req,
         }
 
         obd->obd_requests_queued_for_recovery++;
+        orig_req->rq_copy_queued = 1;
+        req->rq_copy = 1;
 
         if (obd->obd_processing_task != 0) {
                 /* Someone else is processing this queue, we'll leave it to
diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c
index 3c06d8f..95e37fb 100644
--- a/lustre/ldlm/ldlm_lockd.c
+++ b/lustre/ldlm/ldlm_lockd.c
@@ -802,11 +802,6 @@ int ldlm_server_completion_ast(struct ldlm_lock *lock, int flags, void *data)
         total_enqueue_wait = cfs_time_sub(cfs_time_current_sec(),
                                           lock->l_last_activity);
 
-        if (total_enqueue_wait > obd_timeout)
-                /* non-fatal with AT - change to LDLM_DEBUG? */
-                LDLM_WARN(lock, "enqueue wait took %lus from %lu",
-                          total_enqueue_wait, lock->l_last_activity);
-
         lock_res_and_lock(lock);
         if (lock->l_resource->lr_lvb_len) {
                 size[DLM_REQ_REC_OFF] = lock->l_resource->lr_lvb_len;
@@ -846,8 +841,18 @@ int ldlm_server_completion_ast(struct ldlm_lock *lock, int flags, void *data)
 
         /* Server-side enqueue wait time estimate, used in
             __ldlm_add_waiting_lock to set future enqueue timers */
-        at_add(&lock->l_resource->lr_namespace->ns_at_estimate,
-               total_enqueue_wait);
+        if (total_enqueue_wait < ldlm_get_enq_timeout(lock))
+                at_add(&lock->l_resource->lr_namespace->ns_at_estimate,
+                       total_enqueue_wait);
+        else
+                /* bz18618. Don't add lock enqueue time we spend waiting for a
+                   previous callback to fail. Locks waiting legitimately will
+                   get extended by ldlm_refresh_waiting_lock regardless of the
+                   estimate, so it's okay to underestimate here. */
+                LDLM_DEBUG(lock, "lock completed after %lus; estimate was %ds. "
+                       "It is likely that a previous callback timed out.",
+                       total_enqueue_wait,
+                       at_get(&lock->l_resource->lr_namespace->ns_at_estimate));
 
         ptlrpc_req_set_repsize(req, 1, NULL);
 
diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c
index cd85edd..3621d9d 100644
--- a/lustre/ldlm/ldlm_request.c
+++ b/lustre/ldlm/ldlm_request.c
@@ -110,7 +110,7 @@ int ldlm_get_enq_timeout(struct ldlm_lock *lock)
         /* Since these are non-updating timeouts, we should be conservative.
            It would be nice to have some kind of "early reply" mechanism for
            lock callbacks too... */
-        timeout = timeout + (timeout >> 1); /* 150% */
+        timeout = min_t(int, at_max, timeout + (timeout >> 1)); /* 150% */
         return max(timeout, ldlm_enqueue_min);
 }
 EXPORT_SYMBOL(ldlm_get_enq_timeout);
diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c
index d3abbfc..041ebdd 100644
--- a/lustre/llite/dcache.c
+++ b/lustre/llite/dcache.c
@@ -735,7 +735,7 @@ int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd)
                                 nd->intent.open.file->private_data = it;
                                 filp = lookup_instantiate_filp(nd, dentry,NULL);
                                 if (IS_ERR(filp)) {
-                                        rc = 0;
+                                        rc = PTR_ERR(filp);
                                 }
 #else
                                 nd->intent.open.file->private_data = it;
diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c
index 7b67bf2..0da488f 100644
--- a/lustre/llite/llite_lib.c
+++ b/lustre/llite/llite_lib.c
@@ -11,7 +11,7 @@
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * MERCHANTABILITY or FIRTICULAR PURPOSE.  See the GNU
  * General Public License version 2 for more details (a copy is included
  * in the LICENSE file that accompanied this code).
  *
@@ -1949,9 +1949,20 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
                         if (lli->lli_maxbytes > PAGE_CACHE_MAXBYTES)
                                 lli->lli_maxbytes = PAGE_CACHE_MAXBYTES;
                 } else {
-                        if (lli->lli_smd->lsm_magic == lsm->lsm_magic &&
-                             lli->lli_smd->lsm_stripe_count ==
+                        if ((lli->lli_smd->lsm_magic == lsm->lsm_magic ||
+                             (lli->lli_smd->lsm_magic == LOV_MAGIC_V3 &&
+                              lsm->lsm_magic == LOV_MAGIC_V1) ||
+                             (lli->lli_smd->lsm_magic == LOV_MAGIC_V1 &&
+                              lsm->lsm_magic == LOV_MAGIC_V3)) &&
+                            lli->lli_smd->lsm_stripe_count ==
                                         lsm->lsm_stripe_count) {
+                                /* The MDS can suddenly change the magic to
+                                 * v1/v3 if it has been upgraded/downgraded to a
+                                 * version that does/doesn't support OST pools.
+                                 * In this case, we consider that the cached lsm
+                                 * is equivalent to the new one and keep it in
+                                 * place until the inode is evicted from the
+                                 * cache */
                                 if (lov_stripe_md_cmp(lli->lli_smd, lsm)) {
                                         CERROR("lsm mismatch for inode %ld\n",
                                                 inode->i_ino);
@@ -2155,11 +2166,16 @@ int ll_iocontrol(struct inode *inode, struct file *file,
                 rc = mdc_setattr(sbi->ll_mdc_exp, &op_data,
                                  (struct iattr *)&attr, NULL, 0, NULL, 0, &req);
                 ptlrpc_req_finished(req);
-                if (rc || lsm == NULL) {
+                if (rc) {
                         OBDO_FREE(oinfo.oi_oa);
                         RETURN(rc);
                 }
 
+                if (lsm == NULL) {
+                        OBDO_FREE(oinfo.oi_oa);
+                        GOTO(update_cache, rc);
+                }
+
                 oinfo.oi_oa->o_id = lsm->lsm_object_id;
                 oinfo.oi_oa->o_gr = lsm->lsm_object_gr;
                 oinfo.oi_oa->o_flags = flags;
@@ -2172,13 +2188,15 @@ int ll_iocontrol(struct inode *inode, struct file *file,
                 OBDO_FREE(oinfo.oi_oa);
                 if (rc) {
                         if (rc != -EPERM && rc != -EACCES)
-                                CERROR("mdc_setattr_async fails: rc = %d\n", rc);
+                                CERROR("osc_setattr_async fails: rc = %d\n",rc);
                         RETURN(rc);
                 }
 
+                EXIT;
+update_cache:
                 inode->i_flags = ll_ext_to_inode_flags(flags |
                                                        MDS_BFLAG_EXT_FLAGS);
-                RETURN(0);
+                return 0;
         }
         default:
                 RETURN(-ENOSYS);
diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c
index d97ade6..2d382c5 100644
--- a/lustre/llite/rw.c
+++ b/lustre/llite/rw.c
@@ -1615,8 +1615,8 @@ static int ll_readahead(struct ll_readahead_state *ras,
         /* Enlarge the RA window to encompass the full read */
         if (bead != NULL && ras->ras_window_start + ras->ras_window_len <
             bead->lrr_start + bead->lrr_count) {
-                obd_off read_end = (bead->lrr_start + bead->lrr_count) <<
-                                    CFS_PAGE_SHIFT;
+                obd_off read_end = ((obd_off)(bead->lrr_start +
+                                              bead->lrr_count))<<CFS_PAGE_SHIFT;
                 obd_extent_calc(exp, lsm, OBD_CALC_STRIPE_RPC_END_ALIGN,
                                 &read_end);
                 ras->ras_window_len = ((read_end + 1) >> CFS_PAGE_SHIFT) -
diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c
index 9972652..ac912d7 100644
--- a/lustre/llite/rw26.c
+++ b/lustre/llite/rw26.c
@@ -326,7 +326,7 @@ out:
                 rc = ptlrpc_set_wait(set);
                 if (unlikely(rc != 0))
                         GOTO(unlock_mutex, tot_bytes = rc);
-                if (rw == WRITE) {
+                if (rw == WRITE && locked) {
                         lov_stripe_lock(lsm);
                         obd_adjust_kms(ll_i2obdexp(inode),
                                        lsm, file_offset, 0);
diff --git a/lustre/llite/symlink.c b/lustre/llite/symlink.c
index 351c837..19cd222 100644
--- a/lustre/llite/symlink.c
+++ b/lustre/llite/symlink.c
@@ -102,15 +102,11 @@ static int ll_readlink_internal(struct inode *inode,
         /* do not return an error if we cannot cache the symlink locally */
         if (lli->lli_symlink_name) {
                 memcpy(lli->lli_symlink_name, *symname, symlen);
-                ptlrpc_req_finished (*request);
-                *request = NULL;
                 *symname = lli->lli_symlink_name;
         }
-
         RETURN(0);
 
- failed:
-        ptlrpc_req_finished (*request);
+failed:
         RETURN (rc);
 }
 
@@ -131,8 +127,8 @@ static int ll_readlink(struct dentry *dentry, char *buffer, int buflen)
                 GOTO(out, rc);
 
         rc = vfs_readlink(dentry, buffer, buflen, symname);
-        ptlrpc_req_finished(request);
  out:
+        ptlrpc_req_finished(request);
         up(&lli->lli_size_sem);
         RETURN(rc);
 }
@@ -194,7 +190,7 @@ static LL_FOLLOW_LINK_RETURN_TYPE ll_follow_link(struct dentry *dentry, struct n
            we delay request releasing until ll_put_link then. */
         RETURN(request);
 # else
-        if (request != NULL) {
+        if (lli->lli_symlink_name == NULL) {
                 /* falling back to recursive follow link if the request
                  * needs to be cleaned up still. */
                 rc = vfs_follow_link(nd, symname);
diff --git a/lustre/lov/lov_request.c b/lustre/lov/lov_request.c
index 83e7238..bf8a7f4 100644
--- a/lustre/lov/lov_request.c
+++ b/lustre/lov/lov_request.c
@@ -1653,6 +1653,13 @@ int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
                         continue;
                 }
 
+                /* skip targets that have been explicitely disabled by the
+                 * administrator */
+                if (!lov->lov_tgts[i]->ltd_exp) {
+                        CDEBUG(D_HA, "lov idx %d administratively disabled\n", i);
+                        continue;
+                }
+
                 OBD_ALLOC(req, sizeof(*req));
                 if (req == NULL)
                         GOTO(out_set, rc = -ENOMEM);
diff --git a/lustre/lvfs/lvfs_linux.c b/lustre/lvfs/lvfs_linux.c
index 5a77267..20ee26d 100644
--- a/lustre/lvfs/lvfs_linux.c
+++ b/lustre/lvfs/lvfs_linux.c
@@ -414,6 +414,7 @@ int lustre_fsync(struct file *file)
 }
 EXPORT_SYMBOL(lustre_fsync);
 
+/* Note:  dput(dchild) will be called if there is an error */
 struct l_file *l_dentry_open(struct lvfs_run_ctxt *ctxt, struct l_dentry *de,
                              int flags)
 {
diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c
index 492eeea..8d52e21 100644
--- a/lustre/mdc/mdc_locks.c
+++ b/lustre/mdc/mdc_locks.c
@@ -191,6 +191,10 @@ static void mdc_realloc_openmsg(struct ptlrpc_request *req,
         old_size = lustre_packed_msg_size(old_msg);
         lustre_msg_set_buflen(old_msg, DLM_INTENT_REC_OFF + offset,
                               body->eadatasize);
+        /* old buffer is more then need */
+        if (old_len > body->eadatasize)
+                return;
+
         new_size = lustre_packed_msg_size(old_msg);
 
         OBD_ALLOC(new_msg, new_size);
@@ -538,7 +542,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,
                                 else
                                         offset += 2;
 
-                                if (lustre_msg_buflen(req->rq_reqmsg, offset) <
+                                if (lustre_msg_buflen(req->rq_reqmsg, offset) !=
                                     body->eadatasize)
                                         mdc_realloc_openmsg(req, body);
 
diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c
index 3ca0c35..692acb9 100644
--- a/lustre/mds/handler.c
+++ b/lustre/mds/handler.c
@@ -1083,7 +1083,8 @@ static int mds_getattr_lock(struct ptlrpc_request *req, int offset,
                                 rc = rc2;
                         req->rq_status = rc;
                 } else if (rc) {
-                        lustre_shrink_reply(req, offset + 1, 0 , 1);
+                        if (lustre_msg_buflen(req->rq_repmsg, offset + 1) > 0)
+                                lustre_shrink_reply(req, offset + 1, 0, 1);
                 }
         }
 
@@ -1137,7 +1138,8 @@ out_ucred:
                         rc = rc2;
                 req->rq_status = rc;
         } else if (rc) {
-                lustre_shrink_reply(req, REPLY_REC_OFF + 1, 0, 1);
+                if (lustre_msg_buflen(req->rq_repmsg, REPLY_REC_OFF + 1) > 0)
+                        lustre_shrink_reply(req, REPLY_REC_OFF + 1, 0, 1);
         }
         mds_exit_ucred(&uc, mds);
 
diff --git a/lustre/mds/mds_fs.c b/lustre/mds/mds_fs.c
index a48a69c..44f2560 100644
--- a/lustre/mds/mds_fs.c
+++ b/lustre/mds/mds_fs.c
@@ -600,6 +600,8 @@ static int mds_init_server_data(struct obd_device *obd, struct file *file)
                         continue;
                 }
 
+                check_lcd(obd->obd_name, cl_idx, lcd);
+
                 last_transno = lsd_last_transno(lcd);
                 last_epoch = le32_to_cpu(lcd->lcd_last_epoch);
 
@@ -884,6 +886,12 @@ int mds_fs_cleanup(struct obd_device *obd)
                               "will be preserved.\n", obd->obd_name);
 
         class_disconnect_exports(obd); /* cleans up client info too */
+
+       /* some exports may still be in the zombie queue, so we make sure that
+        * all the exports have been processed, otherwise the last_rcvd slot
+        * may not be updated on time */
+        obd_zombie_barrier();
+
         mds_server_free_data(mds);
 
         push_ctxt(saved, &obd->obd_lvfs_ctxt, NULL);
diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c
index 41480df..1bfc5f7 100644
--- a/lustre/mds/mds_open.c
+++ b/lustre/mds/mds_open.c
@@ -361,6 +361,10 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
                 lmm_size = rec->ur_eadatalen;
                 lmm = rec->ur_eadata;
                 LASSERT(lmm);
+                if (lov_mds_md_size(lmm->lmm_stripe_count,
+                                    lmm->lmm_magic) != lmm_size)
+                        CWARN("Bad lmm_size during open replay for inode "
+                              "%lu\n", inode->i_ino);
 
                 if (*handle == NULL) {
                         int stripe_count = le32_to_cpu(lmm->lmm_stripe_count);
@@ -1019,6 +1023,7 @@ int mds_open(struct mds_update_record *rec, int offset,
         struct lvfs_dentry_params dp = LVFS_DENTRY_PARAMS_INIT;
         unsigned int qcids[MAXQUOTAS] = { current->fsuid, current->fsgid };
         unsigned int qpids[MAXQUOTAS] = { 0, 0 };
+        unsigned int ids[MAXQUOTAS] = { 0, 0 };
         int child_mode = LCK_CR;
         /* Always returning LOOKUP lock if open succesful to guard
            dentry on client. */
@@ -1211,8 +1216,10 @@ int mds_open(struct mds_update_record *rec, int offset,
                  * decide if it is out of quota or not b=14783
                  * FIXME: after CMD is used, pointer to obd_trans_info* couldn't
                  * be NULL, b=14840 */
+                ids[0] = current->fsuid;
+                ids[1] = gid;
                 lquota_chkquota(mds_quota_interface_ref, obd,
-                                current->fsuid, gid, 1, quota_pending,
+                                ids[0], ids[1], 1, quota_pending,
                                 NULL, NULL, 0);
 
                 ldlm_reply_set_disposition(rep, DISP_OPEN_CREATE);
@@ -1394,7 +1401,7 @@ found_child:
  cleanup_no_trans:
         if (quota_pending[0] || quota_pending[1])
                 lquota_pending_commit(mds_quota_interface_ref, obd,
-                                      current->fsuid, gid, quota_pending);
+                                      ids[0], ids[1], quota_pending);
         switch (cleanup_phase) {
         case 2:
                 if (rc && created) {
diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c
index fbc77c0..e39f313 100644
--- a/lustre/mds/mds_reint.c
+++ b/lustre/mds/mds_reint.c
@@ -976,6 +976,7 @@ static int mds_reint_create(struct mds_update_record *rec, int offset,
         int created = 0;
         unsigned int qcids[MAXQUOTAS] = { current->fsuid, current->fsgid };
         unsigned int qpids[MAXQUOTAS] = { 0, 0 };
+        unsigned int ids[MAXQUOTAS] = { 0, 0 };
         struct lvfs_dentry_params dp = LVFS_DENTRY_PARAMS_INIT;
         int quota_pending[2] = {0, 0};
         unsigned int gid = current->fsgid;
@@ -1058,8 +1059,10 @@ static int mds_reint_create(struct mds_update_record *rec, int offset,
          * decide if it is out of quota or not b=14783
          * FIXME: after CMD is used, pointer to obd_trans_info* couldn't
          * be NULL, b=14840 */
-        lquota_chkquota(mds_quota_interface_ref, obd,
-                        current->fsuid, gid, 1, quota_pending, NULL, NULL, 0);
+        ids[0] = current->fsuid;
+        ids[1] = gid;
+        lquota_chkquota(mds_quota_interface_ref, obd, ids[0], ids[1],
+                        1, quota_pending, NULL, NULL, 0);
 
         switch (type) {
         case S_IFREG:{
@@ -1197,7 +1200,7 @@ cleanup:
 cleanup_no_trans:
         if (quota_pending[0] || quota_pending[1])
                 lquota_pending_commit(mds_quota_interface_ref, obd,
-                                      current->fsuid, gid, quota_pending);
+                                      ids[0], ids[1], quota_pending);
 
         if (rc && created) {
                 /* Destroy the file we just created.  This should not need
@@ -2019,14 +2022,17 @@ cleanup:
                 struct iattr iattr;
                 int err;
 
-                /* update ctime of unlinked file, even if last link is
-                   removed because open-unlinked file can be statted */
-                iattr.ia_valid = ATTR_CTIME;
-                LTIME_S(iattr.ia_ctime) = rec->ur_time;
-                err = fsfilt_setattr(obd, dchild, handle, &iattr, 0);
-                if (err)
-                        CERROR("error on unlinked inode time update: "
-                               "rc = %d\n", err);
+                if (child_inode->i_nlink > 0 ||
+                    mds_orphan_open_count(child_inode) > 0) {
+                        /* update ctime of unlinked file only if it is still
+                         * opened or a link still exists */
+                        iattr.ia_valid = ATTR_CTIME;
+                        LTIME_S(iattr.ia_ctime) = rec->ur_time;
+                        err = fsfilt_setattr(obd, dchild, handle, &iattr, 0);
+                        if (err)
+                                CERROR("error on unlinked inode time update: "
+                                       "rc = %d\n", err);
+                }
 
                 /* update mtime and ctime of parent directory*/
                 iattr.ia_valid = ATTR_MTIME | ATTR_CTIME;
diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c
index 2471b3e..1421406 100644
--- a/lustre/mgs/mgs_handler.c
+++ b/lustre/mgs/mgs_handler.c
@@ -667,6 +667,10 @@ int mgs_handle(struct ptlrpc_request *req)
 
 static inline int mgs_init_export(struct obd_export *exp)
 {
+        spin_lock(&exp->exp_lock);
+        exp->exp_connecting = 1;
+        spin_unlock(&exp->exp_lock);
+
         return ldlm_init_export(exp);
 }
 
diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c
index 9f3ae9f..8cb6ead 100644
--- a/lustre/obdclass/genops.c
+++ b/lustre/obdclass/genops.c
@@ -1466,6 +1466,7 @@ static struct completion        obd_zombie_start;
 static struct completion        obd_zombie_stop;
 static unsigned long            obd_zombie_flags;
 static cfs_waitq_t              obd_zombie_waitq;
+static pid_t                    obd_zombie_pid;
 
 enum {
         OBD_ZOMBIE_STOP = 1
@@ -1490,6 +1491,35 @@ static void obd_zombie_impexp_notify(void)
         cfs_waitq_signal(&obd_zombie_waitq);
 }
 
+/**
+ * check whether obd_zombie is idle
+ */
+static int obd_zombie_is_idle(void)
+{
+        int rc;
+
+        LASSERT(!test_bit(OBD_ZOMBIE_STOP, &obd_zombie_flags));
+        spin_lock(&obd_zombie_impexp_lock);
+        rc = list_empty(&obd_zombie_imports) &&
+             list_empty(&obd_zombie_exports);
+        spin_unlock(&obd_zombie_impexp_lock);
+        return rc;
+}
+
+/**
+ * wait when obd_zombie import/export queues become empty
+ */
+void obd_zombie_barrier(void)
+{
+        struct l_wait_info lwi = { 0 };
+
+        if (obd_zombie_pid == cfs_curproc_pid())
+                /* don't wait for myself */
+                return;
+        l_wait_event(obd_zombie_waitq, obd_zombie_is_idle(), &lwi);
+}
+EXPORT_SYMBOL(obd_zombie_barrier);
+
 #ifdef __KERNEL__
 
 static int obd_zombie_impexp_thread(void *unused)
@@ -1503,12 +1533,20 @@ static int obd_zombie_impexp_thread(void *unused)
 
         complete(&obd_zombie_start);
 
+        obd_zombie_pid = cfs_curproc_pid();
+
         while(!test_bit(OBD_ZOMBIE_STOP, &obd_zombie_flags)) {
                 struct l_wait_info lwi = { 0 };
 
                 l_wait_event(obd_zombie_waitq, !obd_zombi_impexp_check(NULL), &lwi);
 
                 obd_zombie_impexp_cull();
+
+                /*
+                 * Notify obd_zombie_barrier callers that queues
+                 * may be empty.
+                 */
+                cfs_waitq_signal(&obd_zombie_waitq);
         }
 
         complete(&obd_zombie_stop);
@@ -1546,6 +1584,7 @@ int obd_zombie_impexp_init(void)
         init_completion(&obd_zombie_start);
         init_completion(&obd_zombie_stop);
         cfs_waitq_init(&obd_zombie_waitq);
+        obd_zombie_pid = 0;
 
 #ifdef __KERNEL__
         rc = cfs_kernel_thread(obd_zombie_impexp_thread, NULL, 0);
diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c
index 05b5066..d7f2c08 100644
--- a/lustre/obdclass/llog_lvfs.c
+++ b/lustre/obdclass/llog_lvfs.c
@@ -589,7 +589,7 @@ static int llog_lvfs_create(struct llog_ctxt *ctxt, struct llog_handle **res,
         struct obd_device *obd;
         struct l_dentry *dchild = NULL;
         struct obdo *oa = NULL;
-        int rc = 0, cleanup_phase = 1;
+        int rc = 0;
         int open_flags = O_RDWR | O_CREAT | O_LARGEFILE;
         ENTRY;
 
@@ -610,24 +610,25 @@ static int llog_lvfs_create(struct llog_ctxt *ctxt, struct llog_handle **res,
                         rc = PTR_ERR(dchild);
                         CERROR("error looking up logfile "LPX64":0x%x: rc %d\n",
                                logid->lgl_oid, logid->lgl_ogen, rc);
-                        GOTO(cleanup, rc);
+                        GOTO(out, rc);
                 }
 
-                cleanup_phase = 2;
                 if (dchild->d_inode == NULL) {
+                        l_dput(dchild);
                         rc = -ENOENT;
                         CERROR("nonexistent log file "LPX64":"LPX64": rc %d\n",
                                logid->lgl_oid, logid->lgl_ogr, rc);
-                        GOTO(cleanup, rc);
+                        GOTO(out, rc);
                 }
 
+                /* l_dentry_open will call dput(dchild) if there is an error */
                 handle->lgh_file = l_dentry_open(&obd->obd_lvfs_ctxt, dchild,
                                                     O_RDWR | O_LARGEFILE);
                 if (IS_ERR(handle->lgh_file)) {
                         rc = PTR_ERR(handle->lgh_file);
                         CERROR("error opening logfile "LPX64"0x%x: rc %d\n",
                                logid->lgl_oid, logid->lgl_ogen, rc);
-                        GOTO(cleanup, rc);
+                        GOTO(out, rc);
                 }
 
                 /* assign the value of lgh_id for handle directly */
@@ -645,7 +646,7 @@ static int llog_lvfs_create(struct llog_ctxt *ctxt, struct llog_handle **res,
                                                           0644);
                 }
                 if (IS_ERR(handle->lgh_file))
-                        GOTO(cleanup, rc = PTR_ERR(handle->lgh_file));
+                        GOTO(out, rc = PTR_ERR(handle->lgh_file));
 
                 handle->lgh_id.lgl_ogr = 1;
                 handle->lgh_id.lgl_oid =
@@ -655,25 +656,25 @@ static int llog_lvfs_create(struct llog_ctxt *ctxt, struct llog_handle **res,
         } else {
                 OBDO_ALLOC(oa);
                 if (oa == NULL)
-                        GOTO(cleanup, rc = -ENOMEM);
+                        GOTO(out, rc = -ENOMEM);
 
                 oa->o_gr = FILTER_GROUP_LLOG;
                 oa->o_valid = OBD_MD_FLGENER | OBD_MD_FLGROUP;
 
                 rc = obd_create(ctxt->loc_exp, oa, NULL, NULL);
                 if (rc)
-                        GOTO(cleanup, rc);
+                        GOTO(out, rc);
 
                 dchild = obd_lvfs_fid2dentry(ctxt->loc_exp, oa->o_id,
                                              oa->o_generation, oa->o_gr);
 
                 if (IS_ERR(dchild))
-                        GOTO(cleanup, rc = PTR_ERR(dchild));
-                cleanup_phase = 2;
+                        GOTO(out, rc = PTR_ERR(dchild));
+                
                 handle->lgh_file = l_dentry_open(&obd->obd_lvfs_ctxt, dchild,
                                                  open_flags);
                 if (IS_ERR(handle->lgh_file))
-                        GOTO(cleanup, rc = PTR_ERR(handle->lgh_file));
+                        GOTO(out, rc = PTR_ERR(handle->lgh_file));
 
                 handle->lgh_id.lgl_ogr = oa->o_gr;
                 handle->lgh_id.lgl_oid = oa->o_id;
@@ -681,18 +682,13 @@ static int llog_lvfs_create(struct llog_ctxt *ctxt, struct llog_handle **res,
         }
 
         handle->lgh_ctxt = ctxt;
- finish:
+ out:
+        if (rc)
+                llog_free_handle(handle);
+
         if (oa)
                 OBDO_FREE(oa);
         RETURN(rc);
-cleanup:
-        switch (cleanup_phase) {
-        case 2:
-                l_dput(dchild);
-        case 1:
-                llog_free_handle(handle);
-        }
-        goto finish;
 }
 
 static int llog_lvfs_close(struct llog_handle *handle)
diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c
index 936adef..efe5f51 100644
--- a/lustre/obdfilter/filter.c
+++ b/lustre/obdfilter/filter.c
@@ -925,6 +925,8 @@ static int filter_init_server_data(struct obd_device *obd, struct file * filp)
                         continue;
                 }
 
+                check_lcd(obd->obd_name, cl_idx, lcd);
+
                 last_rcvd = le64_to_cpu(lcd->lcd_last_transno);
 
                 /* These exports are cleaned up by filter_disconnect(), so they
@@ -1435,9 +1437,9 @@ struct dentry *filter_fid2dentry(struct obd_device *obd,
         RETURN(dchild);
 }
 
-static int filter_prepare_destroy(struct obd_device *obd, obd_id objid)
+static int filter_prepare_destroy(struct obd_device *obd, obd_id objid,
+                                  struct lustre_handle *lockh)
 {
-        struct lustre_handle lockh;
         int flags = LDLM_AST_DISCARD_DATA, rc;
         struct ldlm_res_id res_id = { .name = { objid } };
         ldlm_policy_data_t policy = { .l_extent = { 0, OBD_OBJECT_EOF } };
@@ -1448,15 +1450,23 @@ static int filter_prepare_destroy(struct obd_device *obd, obd_id objid)
         rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id, LDLM_EXTENT,
                                     &policy, LCK_PW, &flags, ldlm_blocking_ast,
                                     ldlm_completion_ast, NULL, NULL, 0, NULL,
-                                    &lockh);
-
-        /* We only care about the side-effects, just drop the lock. */
-        if (rc == ELDLM_OK)
-                ldlm_lock_decref(&lockh, LCK_PW);
+                                    lockh);
 
+        if (rc != ELDLM_OK) {
+                lockh->cookie = 0;
+                CERROR("%s: failed to get lock to destroy objid "LPU64" (%d)\n",
+                       obd->obd_name, objid, rc);
+        }
         RETURN(rc);
 }
 
+static void filter_fini_destroy(struct obd_device *obd,
+                                struct lustre_handle *lockh)
+{
+        if (lustre_handle_is_used(lockh))
+                ldlm_lock_decref(lockh, LCK_PW);
+}
+
 /* This is vfs_unlink() without down(i_sem).  If we call regular vfs_unlink()
  * we have 2.6 lock ordering issues with filter_commitrw_write() as it takes
  * i_sem before starting a handle, while filter_destroy() + vfs_unlink do the
@@ -2231,6 +2241,11 @@ static int filter_cleanup(struct obd_device *obd)
                 }
         }
 
+       /* some exports may still be in the zombie queue, so we make sure that
+        * all the exports have been processed, otherwise the last_rcvd slot
+        * may not be updated on time */
+        obd_zombie_barrier();
+
         remove_proc_entry("clear", obd->obd_proc_exports_entry);
         lprocfs_free_per_client_stats(obd);
         lprocfs_free_obd_stats(obd);
@@ -2741,6 +2756,7 @@ int filter_setattr_internal(struct obd_export *exp, struct dentry *dentry,
         loff_t old_size = 0;
         unsigned int ia_valid;
         struct inode *inode;
+        struct page *page = NULL;
         struct iattr iattr;
         void *handle;
         ENTRY;
@@ -2776,6 +2792,17 @@ int filter_setattr_internal(struct obd_export *exp, struct dentry *dentry,
         if (rc)
                 GOTO(out_unlock, rc);
 
+        /* Let's pin the last page so that ldiskfs_truncate
+         * should not start GFP_FS allocation. */
+        if (ia_valid & ATTR_SIZE) {
+                page = grab_cache_page(inode->i_mapping,
+                                       iattr.ia_size >> PAGE_CACHE_SHIFT);
+                if (page == NULL)
+                        GOTO(out_unlock, rc = -ENOMEM);
+
+                unlock_page(page);
+        }
+
         /* If the inode still has SUID+SGID bits set (see filter_precreate())
          * then we will accept the UID+GID sent by the client during write for
          * initializing the ownership of this inode.  We only allow this to
@@ -2866,7 +2893,11 @@ int filter_setattr_internal(struct obd_export *exp, struct dentry *dentry,
         }
 
         EXIT;
+
 out_unlock:
+        if (page)
+                page_cache_release(page);
+
         if (ia_valid & (ATTR_SIZE | ATTR_UID | ATTR_GID))
                 UNLOCK_INODE_MUTEX(inode);
         if (ia_valid & ATTR_SIZE)
@@ -3504,6 +3535,7 @@ int filter_destroy(struct obd_export *exp, struct obdo *oa,
         struct obd_device *obd;
         struct filter_obd *filter;
         struct dentry *dchild = NULL, *dparent = NULL;
+        struct lustre_handle lockh = { 0 };
         struct lvfs_run_ctxt saved;
         void *handle = NULL;
         struct llog_cookie *fcc = NULL;
@@ -3543,7 +3575,9 @@ int filter_destroy(struct obd_export *exp, struct obdo *oa,
                 GOTO(cleanup, rc = -ENOENT);
         }
 
-        filter_prepare_destroy(obd, oa->o_id);
+        rc = filter_prepare_destroy(obd, oa->o_id, &lockh);
+        if (rc)
+                GOTO(cleanup, rc);
 
         /* Our MDC connection is established by the MDS to us */
         if (oa->o_valid & OBD_MD_FLCOOKIE) {
@@ -3559,18 +3593,28 @@ int filter_destroy(struct obd_export *exp, struct obdo *oa,
          * down(i_zombie)       down(i_zombie)
          *                      restart transaction
          * (see BUG 4180) -bzzz
+         *
+         * take i_alloc_sem too to prevent other threads from writing to the
+         * file while we are truncating it. This can cause lock ordering issue
+         * between page lock, i_mutex & starting new journal handle.
+         * (see bug 20321) -johann
          */
+        down_write(&dchild->d_inode->i_alloc_sem);
         LOCK_INODE_MUTEX(dchild->d_inode);
 
         /* VBR: version recovery check */
         rc = filter_version_get_check(exp, oti, dchild->d_inode);
-        if (rc)
+        if (rc) {
+                UNLOCK_INODE_MUTEX(dchild->d_inode);
+                up_write(&dchild->d_inode->i_alloc_sem);
                 GOTO(cleanup, rc);
+        }
 
         handle = fsfilt_start_log(obd, dchild->d_inode, FSFILT_OP_SETATTR,
                                   NULL, 1);
         if (IS_ERR(handle)) {
                 UNLOCK_INODE_MUTEX(dchild->d_inode);
+                up_write(&dchild->d_inode->i_alloc_sem);
                 GOTO(cleanup, rc = PTR_ERR(handle));
         }
 
@@ -3579,6 +3623,7 @@ int filter_destroy(struct obd_export *exp, struct obdo *oa,
         rc = fsfilt_setattr(obd, dchild, handle, &iattr, 1);
         rc2 = fsfilt_commit(obd, dchild->d_inode, handle, 0);
         UNLOCK_INODE_MUTEX(dchild->d_inode);
+        up_write(&dchild->d_inode->i_alloc_sem);
         if (rc)
                 GOTO(cleanup, rc);
         if (rc2)
@@ -3639,6 +3684,8 @@ cleanup:
         case 3:
                 filter_parent_unlock(dparent);
         case 2:
+                filter_fini_destroy(obd, &lockh);
+
                 f_dput(dchild);
                 if (fcc != NULL)
                         OBD_FREE(fcc, sizeof(*fcc));
diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c
index 56ecb74..8c422c3 100644
--- a/lustre/obdfilter/filter_io.c
+++ b/lustre/obdfilter/filter_io.c
@@ -112,10 +112,10 @@ void filter_grant_incoming(struct obd_export *exp, struct obdo *oa)
                 obd_size left_space = filter_grant_space_left(exp);
                 struct filter_obd *filter = &exp->exp_obd->u.filter;
 
-                /*Only if left_space < fo_tot_clients * 32M, 
+                /*Only if left_space < fo_tot_clients * 32M,
                  *then the grant space could be shrinked */
-                if (left_space < filter->fo_tot_granted_clients * 
-                                 FILTER_GRANT_SHRINK_LIMIT) { 
+                if (left_space < filter->fo_tot_granted_clients *
+                                 FILTER_GRANT_SHRINK_LIMIT) {
                         fed->fed_grant -= oa->o_grant;
                         filter->fo_tot_granted -= oa->o_grant;
                         CDEBUG(D_CACHE, "%s: cli %s/%p shrink "LPU64
@@ -248,7 +248,7 @@ long filter_grant(struct obd_export *exp, obd_size current_grant,
         }
 
         CDEBUG(D_CACHE,
-               "%s: cli %s/%p wants: "LPU64" current grant "LPU64 
+               "%s: cli %s/%p wants: "LPU64" current grant "LPU64
                " granting: "LPU64"\n", obd->obd_name, exp->exp_client_uuid.uuid,
                exp, want, current_grant, grant);
         CDEBUG(D_CACHE,
@@ -513,8 +513,8 @@ static int filter_preprw_read(int cmd, struct obd_export *exp, struct obdo *oa,
  * right on through.
  *
  * Caller must hold obd_osfs_lock. */
-static int filter_grant_check(struct obd_export *exp, struct obdo *oa, 
-                              int objcount, struct fsfilt_objinfo *fso, 
+static int filter_grant_check(struct obd_export *exp, struct obdo *oa,
+                              int objcount, struct fsfilt_objinfo *fso,
                               int niocount, struct niobuf_local *lnb,
                               obd_size *left, struct inode *inode)
 {
@@ -768,8 +768,7 @@ static int filter_preprw_write(int cmd, struct obd_export *exp, struct obdo *oa,
                  * be able to proceed in filter_commitrw_write(). thus let's
                  * just wait for writeout completion, should be rare enough.
                  * -bzzz */
-                if (obd->u.filter.fo_writethrough_cache)
-                        wait_on_page_writeback(lnb->page);
+                wait_on_page_writeback(lnb->page);
                 BUG_ON(PageWriteback(lnb->page));
 
                 /* If the filter writes a partial page, then has the file
diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c
index 22c841d..31219dd 100644
--- a/lustre/obdfilter/filter_io_26.c
+++ b/lustre/obdfilter/filter_io_26.c
@@ -589,7 +589,7 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
         void *wait_handle = NULL;
         int total_size = 0;
         int quota_pending[2] = {0, 0}, quota_pages = 0;
-        unsigned int qcids[MAXQUOTAS] = {0, 0};
+        unsigned int qcids[MAXQUOTAS] = { oa->o_uid, oa->o_gid };
         int sync_journal_commit = obd->u.filter.fo_syncjournal;
         ENTRY;
 
@@ -664,7 +664,7 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
 
         /* we try to get enough quota to write here, and let ldiskfs
          * decide if it is out of quota or not b=14783 */
-        lquota_chkquota(filter_quota_interface_ref, obd, oa->o_uid, oa->o_gid,
+        lquota_chkquota(filter_quota_interface_ref, obd, qcids[0], qcids[1],
                         quota_pages, quota_pending, oti, inode,
                         obj->ioo_bufcnt);
 
@@ -762,7 +762,7 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
 cleanup:
         if (quota_pending[0] || quota_pending[1])
                 lquota_pending_commit(filter_quota_interface_ref, obd,
-                                      oa->o_uid, oa->o_gid, quota_pending);
+                                      qcids[0], qcids[1], quota_pending);
 
         filter_grant_commit(exp, niocount, res);
 
@@ -777,21 +777,34 @@ cleanup:
                  * lnb->page automatically returns back into per-thread page
                  * pool (bug 5137)
                  */
-                f_dput(res->dentry);
+                 break;
         }
 
         /* trigger quota pre-acquire */
-        qcids[USRQUOTA] = oa->o_uid;
-        qcids[GRPQUOTA] = oa->o_gid;
         err = lquota_adjust(filter_quota_interface_ref, obd, qcids, NULL, rc,
                             FSFILT_OP_CREATE);
-        CDEBUG(err ? D_ERROR : D_QUOTA,
-               "filter adjust qunit! (rc:%d)\n", err);
+        CDEBUG(err ? D_ERROR : D_QUOTA, "filter adjust qunit! "
+               "(rc:%d, uid:%u, gid:%u)\n", err, qcids[0], qcids[1]);
+        if (qcids[USRQUOTA] != oa->o_uid || qcids[GRPQUOTA] != oa->o_gid) {
+                qcids[0] = oa->o_uid;
+                qcids[1] = oa->o_gid;
+                err = lquota_adjust(filter_quota_interface_ref, obd, qcids,
+                                    NULL, rc, FSFILT_OP_CREATE);
+                CDEBUG(err ? D_ERROR : D_QUOTA, "filter adjust qunit! "
+                       "(rc:%d, uid:%u, gid:%u)\n", err, qcids[0], qcids[1]);
+        }
 
         for (i = 0, lnb = res; i < niocount; i++, lnb++) {
                 if (lnb->page == NULL)
                         continue;
 
+                if (rc)
+                        /* If the write has failed, the page cache may
+                         * not be consitent with what is on disk, so
+                         * force pages to be reread next time it is
+                         * accessed */
+                        ClearPageUptodate(lnb->page);
+
                 LASSERT(PageLocked(lnb->page));
                 unlock_page(lnb->page);
 
@@ -805,6 +818,7 @@ cleanup:
                         filter_release_cache(obd, obj, nb, inode);
                 up_read(&inode->i_alloc_sem);
         }
+        f_dput(res->dentry);
 
         RETURN(rc);
 }
diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c
index 12b4be0..eec906b 100644
--- a/lustre/osc/osc_request.c
+++ b/lustre/osc/osc_request.c
@@ -1648,20 +1648,21 @@ static int async_internal(int cmd, struct obd_export *exp, struct obdo *oa,
                                   page_count, pga, &request);
 
         CLASSERT(sizeof(*aa) <= sizeof(request->rq_async_args));
-        aa = ptlrpc_req_async_args(request);
-        if (cmd == OBD_BRW_READ) {
-                lprocfs_oh_tally_log2(&cli->cl_read_page_hist, page_count);
-                lprocfs_oh_tally(&cli->cl_read_rpc_hist, cli->cl_r_in_flight);
-        } else {
-                lprocfs_oh_tally_log2(&cli->cl_write_page_hist, page_count);
-                lprocfs_oh_tally(&cli->cl_write_rpc_hist,
-                                 cli->cl_w_in_flight);
-        }
-        ptlrpc_lprocfs_brw(request, aa->aa_requested_nob);
-
-        LASSERT(list_empty(&aa->aa_oaps));
 
         if (rc == 0) {
+                aa = ptlrpc_req_async_args(request);
+                if (cmd == OBD_BRW_READ) {
+                        lprocfs_oh_tally_log2(&cli->cl_read_page_hist, page_count);
+                        lprocfs_oh_tally(&cli->cl_read_rpc_hist, cli->cl_r_in_flight);
+                } else {
+                        lprocfs_oh_tally_log2(&cli->cl_write_page_hist, page_count);
+                        lprocfs_oh_tally(&cli->cl_write_rpc_hist,
+                                         cli->cl_w_in_flight);
+                }
+                ptlrpc_lprocfs_brw(request, aa->aa_requested_nob);
+
+                LASSERT(list_empty(&aa->aa_oaps));
+
                 request->rq_interpret_reply = brw_interpret;
                 ptlrpc_set_add_req(set, request);
                 client_obd_list_lock(&cli->cl_loi_list_lock);
@@ -3516,6 +3517,14 @@ static int osc_statfs_interpret(struct ptlrpc_request *req,
         struct obd_statfs *msfs;
         ENTRY;
 
+        if (rc == -EBADR)
+                /* The request has in fact never been sent
+                 * due to issues at a higher level (LOV).
+                 * Exit immediately since the caller is
+                 * aware of the problem and takes care
+                 * of the clean up */
+                 RETURN(rc);
+
         if ((rc == -ENOTCONN || rc == -EAGAIN) &&
             (aa->aa_oi->oi_flags & OBD_STATFS_NODELAY))
                 GOTO(out, rc = 0);
@@ -3936,18 +3945,30 @@ static int osc_set_info_async(struct obd_export *exp, obd_count keylen,
         OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_SHUTDOWN, 10);
 
         if (KEY_IS(KEY_NEXT_ID)) {
+                obd_id new_val;
+                struct osc_creator *oscc = &obd->u.cli.cl_oscc;
+
                 if (vallen != sizeof(obd_id))
                         RETURN(-EINVAL);
-                obd->u.cli.cl_oscc.oscc_next_id = *((obd_id*)val) + 1;
+
+                /* avoid race between allocate new object and set next id
+                 * from ll_sync thread */
+                spin_lock(&oscc->oscc_lock);
+                new_val = *((obd_id*)val) + 1;
+                if (new_val >= oscc->oscc_next_id);
+                        oscc->oscc_next_id = new_val;
+                spin_unlock(&oscc->oscc_lock);
+
                 CDEBUG(D_HA, "%s: set oscc_next_id = "LPU64"\n",
                        exp->exp_obd->obd_name,
-                       obd->u.cli.cl_oscc.oscc_next_id);
+                       oscc->oscc_next_id);
 
                 RETURN(0);
         }
 
         if (KEY_IS(KEY_UNLINKED)) {
                 struct osc_creator *oscc = &obd->u.cli.cl_oscc;
+
                 spin_lock(&oscc->oscc_lock);
                 oscc->oscc_flags &= ~OSCC_FLAG_NOSPC;
                 spin_unlock(&oscc->oscc_lock);
diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c
index 1b21669..737fdd9 100644
--- a/lustre/ost/ost_handler.c
+++ b/lustre/ost/ost_handler.c
@@ -697,8 +697,8 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
 
         desc = ptlrpc_prep_bulk_exp(req, npages,
                                      BULK_PUT_SOURCE, OST_BULK_PORTAL);
-        if (desc == NULL) /* XXX: check all cleanup stuff */
-                GOTO(out, rc = -ENOMEM);
+        if (desc == NULL)
+                GOTO(out_lock, rc = -ENOMEM);
 
         ost_rw_prolong_locks(req, ioo, remote_nb, &body->oa, LCK_PW | LCK_PR);
 
@@ -963,7 +963,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
         desc = ptlrpc_prep_bulk_exp(req, npages,
                                      BULK_GET_SINK, OST_BULK_PORTAL);
         if (desc == NULL)
-                GOTO(out, rc = -ENOMEM);
+                GOTO(out_lock, rc = -ENOMEM);
 
         /* NB Having prepped, we must commit... */
 
diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c
index e48cf86..f9599c0 100644
--- a/lustre/ptlrpc/niobuf.c
+++ b/lustre/ptlrpc/niobuf.c
@@ -80,7 +80,7 @@ static int ptl_send_buf (lnet_handle_md_t *mdh, void *base, int len,
         CDEBUG(D_NET, "Sending %d bytes to portal %d, xid "LPD64", offset %u\n",
                len, portal, xid, offset);
 
-        rc = LNetPut (conn->c_self, *mdh, ack, 
+        rc = LNetPut (conn->c_self, *mdh, ack,
                       conn->c_peer, portal, xid, offset, 0);
         if (rc != 0) {
                 int rc2;
@@ -105,7 +105,7 @@ int ptlrpc_start_bulk_transfer(struct ptlrpc_bulk_desc *desc)
         __u64                     xid;
         ENTRY;
 
-        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_PTLRPC_BULK_PUT_NET)) 
+        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_PTLRPC_BULK_PUT_NET))
                 RETURN(0);
 
         /* NB no locking required until desc is on the network */
@@ -138,17 +138,17 @@ int ptlrpc_start_bulk_transfer(struct ptlrpc_bulk_desc *desc)
         xid = desc->bd_req->rq_xid;
         CDEBUG(D_NET, "Transferring %u pages %u bytes via portal %d "
                "id %s xid "LPX64"\n", desc->bd_iov_count,
-               desc->bd_nob, desc->bd_portal, 
+               desc->bd_nob, desc->bd_portal,
                libcfs_id2str(conn->c_peer), xid);
 
         /* Network is about to get at the memory */
         desc->bd_network_rw = 1;
 
         if (desc->bd_type == BULK_PUT_SOURCE)
-                rc = LNetPut (conn->c_self, desc->bd_md_h, LNET_ACK_REQ, 
+                rc = LNetPut (conn->c_self, desc->bd_md_h, LNET_ACK_REQ,
                               conn->c_peer, desc->bd_portal, xid, 0, 0);
         else
-                rc = LNetGet (conn->c_self, desc->bd_md_h, 
+                rc = LNetGet (conn->c_self, desc->bd_md_h,
                               conn->c_peer, desc->bd_portal, xid, 0);
 
         if (rc != 0) {
@@ -175,10 +175,11 @@ void ptlrpc_abort_bulk(struct ptlrpc_bulk_desc *desc)
 
         if (!ptlrpc_server_bulk_active(desc))   /* completed or */
                 return;                         /* never started */
-        
-        /* Do not send any meaningful data over the wire for evicted clients */
-        if (desc->bd_export && desc->bd_export->exp_failed)
-                ptl_rpc_wipe_bulk_pages(desc);
+
+        /* We used to poison the pages with 0xab here because we did not want to
+         * send any meaningful data over the wire for evicted clients (bug 9297)
+         * However, this is no longer safe now that we use the page cache on the
+         * OSS (bug 20560) */
 
         /* The unlink ensures the callback happens ASAP and is the last
          * one.  If it fails, it must be because completion just happened,
@@ -192,7 +193,7 @@ void ptlrpc_abort_bulk(struct ptlrpc_bulk_desc *desc)
                  * timeout lets us CWARN for visibility of sluggish NALs */
                 lwi = LWI_TIMEOUT_INTERVAL(cfs_time_seconds(LONG_UNLINK),
                                            cfs_time_seconds(1), NULL, NULL);
-                rc = l_wait_event(desc->bd_waitq, 
+                rc = l_wait_event(desc->bd_waitq,
                                   !ptlrpc_server_bulk_active(desc), &lwi);
                 if (rc == 0)
                         return;
@@ -212,7 +213,7 @@ int ptlrpc_register_bulk(struct ptlrpc_request *req)
         lnet_md_t         md;
         ENTRY;
 
-        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_PTLRPC_BULK_GET_NET)) 
+        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_PTLRPC_BULK_GET_NET))
                 RETURN(0);
 
         /* NB no locking required until desc is on the network */
@@ -231,8 +232,8 @@ int ptlrpc_register_bulk(struct ptlrpc_request *req)
         md.user_ptr = &desc->bd_cbid;
         md.eq_handle = ptlrpc_eq_h;
         md.threshold = 1;                       /* PUT or GET */
-        md.options = PTLRPC_MD_OPTIONS | 
-                     ((desc->bd_type == BULK_GET_SOURCE) ? 
+        md.options = PTLRPC_MD_OPTIONS |
+                     ((desc->bd_type == BULK_GET_SOURCE) ?
                       LNET_MD_OP_GET : LNET_MD_OP_PUT);
         ptlrpc_fill_bulk_md(&md, desc);
 
@@ -293,7 +294,7 @@ int ptlrpc_unregister_bulk(struct ptlrpc_request *req, int async)
         LASSERT(!in_interrupt());     /* might sleep */
 
         /* Let's setup deadline for reply unlink. */
-        if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK) && 
+        if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK) &&
             async && req->rq_bulk_deadline == 0)
                 req->rq_bulk_deadline = cfs_time_current_sec() + LONG_UNLINK;
 
@@ -380,10 +381,10 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags)
         lustre_msg_set_type(req->rq_repmsg, req->rq_type);
         lustre_msg_set_status(req->rq_repmsg, req->rq_status);
         lustre_msg_set_opc(req->rq_repmsg, lustre_msg_get_opc(req->rq_reqmsg));
-        
+
         service_time = max_t(int, cfs_time_current_sec() -
                              req->rq_arrival_time.tv_sec, 1);
-        if (!(flags & PTLRPC_REPLY_EARLY) && 
+        if (!(flags & PTLRPC_REPLY_EARLY) &&
             (req->rq_type != PTL_RPC_MSG_ERR) &&
             !(lustre_msg_get_flags(req->rq_reqmsg) &
               (MSG_RESENT | MSG_REPLAY | MSG_LAST_REPLAY))) {
@@ -393,7 +394,7 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags)
                 if (oldse != 0)
                         DEBUG_REQ(D_ADAPTTO, req,
                                   "svc %s changed estimate from %d to %d",
-                                  svc->srv_name, oldse, 
+                                  svc->srv_name, oldse,
                                   at_get(&svc->srv_at_estimate));
         }
         /* Report actual service time for client latency calc */
@@ -416,14 +417,14 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags)
                         offset = 0;
                         /* Include a checksum on early replies - must be done
                            after all other lustre_msg_set_* */
-                        lustre_msg_set_cksum(req->rq_repmsg, 
+                        lustre_msg_set_cksum(req->rq_repmsg,
                                          lustre_msg_calc_cksum(req->rq_repmsg));
                 } else {
                         offset = lustre_msg_early_size(req);
                 }
         } else {
                 CDEBUG(D_ADAPTTO, "No early reply support: flags=%#x "
-                       "req_flags=%#x magic=%d:%x/%x len=%d\n", 
+                       "req_flags=%#x magic=%d:%x/%x len=%d\n",
                       flags, lustre_msg_get_flags(req->rq_reqmsg),
                       lustre_msg_is_v1(req->rq_reqmsg),
                       lustre_msg_get_magic(req->rq_reqmsg),
@@ -439,11 +440,11 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags)
                 CERROR("not replying on NULL connection\n"); /* bug 9635 */
                 return -ENOTCONN;
         }
-        
+
         atomic_inc (&svc->srv_outstanding_replies);
         ptlrpc_rs_addref(rs);                   /* +1 ref for the network */
         req->rq_sent = cfs_time_current_sec();
-        
+
         rc = ptl_send_buf (&rs->rs_md_h, req->rq_repmsg, req->rq_replen,
                            rs->rs_difficult ? LNET_ACK_REQ : LNET_NOACK_REQ,
                            &rs->rs_cb_id, conn, svc->srv_rep_portal,
@@ -493,7 +494,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
         struct obd_device *obd = request->rq_import->imp_obd;
         ENTRY;
 
-        OBD_FAIL_RETURN(OBD_FAIL_PTLRPC_DROP_RPC, 0); 
+        OBD_FAIL_RETURN(OBD_FAIL_PTLRPC_DROP_RPC, 0);
 
         LASSERT (request->rq_type == PTL_RPC_MSG_REQUEST);
 
@@ -580,7 +581,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
 
                 /* We must see the unlink callback to unset rq_must_unlink,
                    so we can't auto-unlink */
-                rc = LNetMDAttach(reply_me_h, reply_md, LNET_RETAIN, 
+                rc = LNetMDAttach(reply_me_h, reply_md, LNET_RETAIN,
                                  &request->rq_reply_md_h);
                 if (rc != 0) {
                         CERROR("LNetMDAttach failed: %d\n", rc);
@@ -608,13 +609,13 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
 
         request->rq_sent = cfs_time_current_sec();
         do_gettimeofday(&request->rq_arrival_time);
-        /* We give the server rq_timeout secs to process the req, and 
+        /* We give the server rq_timeout secs to process the req, and
            add the network latency for our local timeout. */
-        request->rq_deadline = request->rq_sent + request->rq_timeout + 
+        request->rq_deadline = request->rq_sent + request->rq_timeout +
                     ptlrpc_at_get_net_latency(request);
 
         ptlrpc_pinger_sending_on_import(request->rq_import);
-        
+
         DEBUG_REQ(D_INFO, request, "send flg=%x",
                   lustre_msg_get_flags(request->rq_reqmsg));
         rc = ptl_send_buf(&request->rq_req_md_h,
@@ -682,7 +683,7 @@ int ptlrpc_register_rqbd(struct ptlrpc_request_buffer_desc *rqbd)
         md.options   = PTLRPC_MD_OPTIONS | LNET_MD_OP_PUT | LNET_MD_MAX_SIZE;
         md.user_ptr  = &rqbd->rqbd_cbid;
         md.eq_handle = ptlrpc_eq_h;
-        
+
         rc = LNetMDAttach(me_h, md, LNET_UNLINK, &rqbd->rqbd_md_h);
         if (rc == 0)
                 return (0);
@@ -692,6 +693,6 @@ int ptlrpc_register_rqbd(struct ptlrpc_request_buffer_desc *rqbd)
         rc = LNetMEUnlink (me_h);
         LASSERT (rc == 0);
         rqbd->rqbd_refcount = 0;
-        
+
         return (-ENOMEM);
 }
diff --git a/lustre/ptlrpc/pers.c b/lustre/ptlrpc/pers.c
index d53d42c..38432c3 100644
--- a/lustre/ptlrpc/pers.c
+++ b/lustre/ptlrpc/pers.c
@@ -73,18 +73,6 @@ void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, cfs_page_t *page,
         desc->bd_iov_count++;
 }
 
-void ptl_rpc_wipe_bulk_pages(struct ptlrpc_bulk_desc *desc)
-{
-        int i;
-        
-        for (i = 0; i < desc->bd_iov_count ; i++) {
-                lnet_kiov_t *kiov = &desc->bd_iov[i];
-                memset(cfs_kmap(kiov->kiov_page)+kiov->kiov_offset, 0xab,
-                       kiov->kiov_len);
-                cfs_kunmap(kiov->kiov_page);
-        }
-}
-
 #else /* !__KERNEL__ */
 
 void ptlrpc_fill_bulk_md(lnet_md_t *md, struct ptlrpc_bulk_desc *desc)
@@ -95,7 +83,7 @@ void ptlrpc_fill_bulk_md(lnet_md_t *md, struct ptlrpc_bulk_desc *desc)
                 md->length = desc->bd_iov[0].iov_len;
                 return;
         }
-        
+
         md->options |= LNET_MD_IOVEC;
         md->start = &desc->bd_iov[0];
         md->length = desc->bd_iov_count;
@@ -103,7 +91,7 @@ void ptlrpc_fill_bulk_md(lnet_md_t *md, struct ptlrpc_bulk_desc *desc)
 
 static int can_merge_iovs(lnet_md_iovec_t *existing, lnet_md_iovec_t *candidate)
 {
-        if (existing->iov_base + existing->iov_len == candidate->iov_base) 
+        if (existing->iov_base + existing->iov_len == candidate->iov_base)
                 return 1;
 #if 0
         /* Enable this section to provide earlier evidence of fragmented bulk */
@@ -114,7 +102,7 @@ static int can_merge_iovs(lnet_md_iovec_t *existing, lnet_md_iovec_t *candidate)
         return 0;
 }
 
-void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, cfs_page_t *page, 
+void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, cfs_page_t *page,
                           int pageoffset, int len)
 {
         lnet_md_iovec_t *iov = &desc->bd_iov[desc->bd_iov_count];
@@ -129,14 +117,4 @@ void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, cfs_page_t *page,
         }
 }
 
-void ptl_rpc_wipe_bulk_pages(struct ptlrpc_bulk_desc *desc)
-{
-        int i;
-
-        for(i = 0; i < desc->bd_iov_count; i++) {
-                lnet_md_iovec_t *iov = &desc->bd_iov[i];
-
-                memset(iov->iov_base, 0xab, iov->iov_len);
-        }
-}
 #endif /* !__KERNEL__ */
diff --git a/lustre/ptlrpc/ptlrpc_internal.h b/lustre/ptlrpc/ptlrpc_internal.h
index 98ba674..84dccf9 100644
--- a/lustre/ptlrpc/ptlrpc_internal.h
+++ b/lustre/ptlrpc/ptlrpc_internal.h
@@ -89,7 +89,6 @@ int ptlrpc_expire_one_request(struct ptlrpc_request *req, int async_unlink);
 void ptlrpc_fill_bulk_md(lnet_md_t *md, struct ptlrpc_bulk_desc *desc);
 void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, cfs_page_t *page,
                           int pageoffset, int len);
-void ptl_rpc_wipe_bulk_pages(struct ptlrpc_bulk_desc *desc);
 
 /* pinger.c */
 int ptlrpc_start_pinger(void);
@@ -109,7 +108,7 @@ int llog_recov_init(void);
 void llog_recov_fini(void);
 
 static inline int ll_rpc_recoverable_error(int rc)
-{ 
+{
         return (rc == -ENOTCONN || rc == -ENODEV);
 }
 #endif /* PTLRPC_INTERNAL_H */
diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c
index 293ab95..42f09f8 100644
--- a/lustre/ptlrpc/service.c
+++ b/lustre/ptlrpc/service.c
@@ -691,7 +691,7 @@ static int ptlrpc_at_add_timed(struct ptlrpc_request *req)
 
         LASSERT(list_empty(&req->rq_timed_list));
 
-        index = req->rq_deadline % array->paa_size;
+        index = (unsigned long)req->rq_deadline % array->paa_size;
         if (array->paa_reqs_count[index] > 0) {
                 /* latest rpcs will have the latest deadlines in the list,
                  * so search backward. */
@@ -888,7 +888,7 @@ static int ptlrpc_at_check_timed(struct ptlrpc_service *svc)
            server will take. Send early replies to everyone expiring soon. */
         CFS_INIT_LIST_HEAD(&work_list);
         deadline = -1;
-        index = array->paa_deadline % array->paa_size;
+        index = (unsigned long)array->paa_deadline % array->paa_size;
         count = array->paa_count;
         while (count > 0) {
                 count -= array->paa_reqs_count[index];
@@ -1357,7 +1357,7 @@ ptlrpc_server_handle_request(struct ptlrpc_service *svc,
                lustre_msg_get_opc(request->rq_reqmsg));
 
 put_rpc_export:
-        if (export != NULL)
+        if (export != NULL && !request->rq_copy_queued)
                 class_export_rpc_put(export);
 
 put_conn:
diff --git a/lustre/quota/quota_context.c b/lustre/quota/quota_context.c
index 423629b..3f19a9e 100644
--- a/lustre/quota/quota_context.c
+++ b/lustre/quota/quota_context.c
@@ -650,15 +650,18 @@ dqacq_completion(struct obd_device *obd, struct lustre_quota_ctxt *qctxt,
                         INC_QLIMIT(*hardlimit, count);
                         break;
                 case QUOTA_DQREL:
-                        LASSERTF(count < *hardlimit,
-                                 "id(%u) flag(%u) type(%c) isblk(%c) "
-                                 "count("LPU64") qd_qunit("LPU64") "
-                                 "hardlimit("LPU64").\n",
-                                 qdata->qd_id, qdata->qd_flags,
-                                 QDATA_IS_GRP(qdata) ? 'g' : 'u',
-                                 QDATA_IS_BLK(qdata) ? 'b': 'i',
-                                 qdata->qd_count, qdata->qd_qunit, *hardlimit);
-                        *hardlimit -= count;
+                        if (count >= *hardlimit)
+                                CERROR("release quota error: id(%u) flag(%u) "
+                                       "type(%c) isblk(%c) count("LPU64") "
+                                       "qd_qunit("LPU64") hardlimit("LPU64") "
+                                       "qdata(%p)\n",
+                                       qdata->qd_id, qdata->qd_flags,
+                                       QDATA_IS_GRP(qdata) ? 'g' : 'u',
+                                       QDATA_IS_BLK(qdata) ? 'b': 'i',
+                                       qdata->qd_count, qdata->qd_qunit, *hardlimit,
+                                       qdata);
+                        else
+                                *hardlimit -= count;
                         break;
                 default:
                         LBUG();
diff --git a/lustre/quota/quota_master.c b/lustre/quota/quota_master.c
index 24e8131..84b60ee 100644
--- a/lustre/quota/quota_master.c
+++ b/lustre/quota/quota_master.c
@@ -505,7 +505,7 @@ int mds_quota_adjust(struct obd_device *obd, unsigned int qcids[],
         }
 
         if (rc2)
-                CDEBUG(rc2 == QUOTA_REQ_RETURNED ? D_QUOTA: D_ERROR,
+                CDEBUG(D_QUOTA,
                        "mds adjust qunit %ssuccessfully! (opc:%d rc:%d)\n",
                        rc2 == QUOTA_REQ_RETURNED ? "" : "un", opc, rc2);
         RETURN(0);
@@ -544,9 +544,9 @@ int filter_quota_adjust(struct obd_device *obd, unsigned int qcids[],
         if (rc || rc2) {
                 if (!rc)
                         rc = rc2;
-                CDEBUG(rc == QUOTA_REQ_RETURNED ? D_QUOTA: D_ERROR,
+                CDEBUG(D_QUOTA,
                        "filter adjust qunit %ssuccessfully! (opc:%d rc%d)\n",
-                       QUOTA_REQ_RETURNED ? "" : "un", opc, rc);
+                       rc == QUOTA_REQ_RETURNED ? "" : "un", opc, rc);
         }
 
         RETURN(0);
diff --git a/lustre/scripts/Makefile.am b/lustre/scripts/Makefile.am
index 8eebb58..4904457 100644
--- a/lustre/scripts/Makefile.am
+++ b/lustre/scripts/Makefile.am
@@ -57,4 +57,4 @@ $(genscripts): %: %.in
 	chmod +x $@
 
 tree_status.pl: version_tag.pl
-	ln version_tag.pl tree_status.pl
+	ln -f version_tag.pl tree_status.pl
diff --git a/lustre/scripts/Makefile.in b/lustre/scripts/Makefile.in
index 66e793b..71f8420 100644
--- a/lustre/scripts/Makefile.in
+++ b/lustre/scripts/Makefile.in
@@ -557,7 +557,7 @@ $(genscripts): %: %.in
 	chmod +x $@
 
 tree_status.pl: version_tag.pl
-	ln version_tag.pl tree_status.pl
+	ln -f version_tag.pl tree_status.pl
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/lustre/scripts/lustre_rmmod b/lustre/scripts/lustre_rmmod
old mode 100644
new mode 100755
diff --git a/lustre/scripts/tree_status.pl b/lustre/scripts/tree_status.pl
index 84365b1..4b15a70 100644
--- a/lustre/scripts/tree_status.pl
+++ b/lustre/scripts/tree_status.pl
@@ -154,6 +154,10 @@ sub get_linuxdir()
             $dir = $1;
         } elsif ($line =~ /LINUX_OBJ :?= (.*)/) {
             $objdir = $1;
+        } elsif ($line =~ /MODULES_TRUE :?= (.*)/) {
+            # nothing to do if modules are not being built
+            return ""
+                if ($1 eq "#");
             last;
         }
     }
@@ -198,6 +202,13 @@ sub generate_ver($$$)
     my $mtime = shift;
     my $linuxdir = shift;
 
+    # assume building without modules
+    my $postfix = "";
+
+    if ($linuxdir ne "") {
+        $postfix = "-$kernver";
+    }
+
     #print "localtime: " . localtime($mtime) . "\n";
 
     my $lustre_vers = $ENV{LUSTRE_VERS};
@@ -215,9 +226,9 @@ sub generate_ver($$$)
     # lines.  maybe we only want to print -CHANGED when something is changed
     # and print nothing when it's pristine
     if ($pristine) {
-        print "$tag-$show_last-PRISTINE-$linuxdir-$kernver\"\n";
+        print "$tag-$show_last-PRISTINE$postfix\"\n";
     } else {
-        print "$tag-$show_last-CHANGED-$linuxdir-$kernver\"\n";
+        print "$tag-$show_last-CHANGED$postfix\"\n";
     }
 }
 
diff --git a/lustre/scripts/version_tag.pl b/lustre/scripts/version_tag.pl
index 84365b1..4b15a70 100644
--- a/lustre/scripts/version_tag.pl
+++ b/lustre/scripts/version_tag.pl
@@ -154,6 +154,10 @@ sub get_linuxdir()
             $dir = $1;
         } elsif ($line =~ /LINUX_OBJ :?= (.*)/) {
             $objdir = $1;
+        } elsif ($line =~ /MODULES_TRUE :?= (.*)/) {
+            # nothing to do if modules are not being built
+            return ""
+                if ($1 eq "#");
             last;
         }
     }
@@ -198,6 +202,13 @@ sub generate_ver($$$)
     my $mtime = shift;
     my $linuxdir = shift;
 
+    # assume building without modules
+    my $postfix = "";
+
+    if ($linuxdir ne "") {
+        $postfix = "-$kernver";
+    }
+
     #print "localtime: " . localtime($mtime) . "\n";
 
     my $lustre_vers = $ENV{LUSTRE_VERS};
@@ -215,9 +226,9 @@ sub generate_ver($$$)
     # lines.  maybe we only want to print -CHANGED when something is changed
     # and print nothing when it's pristine
     if ($pristine) {
-        print "$tag-$show_last-PRISTINE-$linuxdir-$kernver\"\n";
+        print "$tag-$show_last-PRISTINE$postfix\"\n";
     } else {
-        print "$tag-$show_last-CHANGED-$linuxdir-$kernver\"\n";
+        print "$tag-$show_last-CHANGED$postfix\"\n";
     }
 }
 
diff --git a/lustre/tests/Makefile.am b/lustre/tests/Makefile.am
index 4529a8c..c5eeae7 100644
--- a/lustre/tests/Makefile.am
+++ b/lustre/tests/Makefile.am
@@ -6,7 +6,7 @@ AM_CFLAGS = $(LLCFLAGS)
 
 DIST_SUBDIRS := mpi
 
-noinst_DATA = disk1_4.zip
+noinst_DATA = disk1_6.tar.bz2
 noinst_SCRIPTS = leak_finder.pl llmount.sh llmountcleanup.sh functions.sh
 noinst_SCRIPTS += test-framework.sh runvmstat runiozone runtests
 noinst_SCRIPTS += sanity.sh rundbench acceptance-small.sh compile.sh
@@ -21,6 +21,7 @@ noinst_SCRIPTS += lockorder.sh socketclient socketserver runmultiop_bg_pause
 noinst_SCRIPTS += recovery-mds-scale.sh run_dd.sh run_tar.sh run_iozone.sh
 noinst_SCRIPTS += run_dbench.sh run_IOR.sh recovery-double-scale.sh
 noinst_SCRIPTS += recovery-random-scale.sh parallel-scale.sh
+noinst_SCRIPTS += ost-pools.sh rpc.sh
 nobase_noinst_SCRIPTS = cfg/local.sh
 nobase_noinst_SCRIPTS += acl/make-tree acl/run cfg/ncli.sh
 nobase_noinst_SCRIPTS += racer/dir_create.sh racer/file_create.sh racer/file_list.sh
diff --git a/lustre/tests/Makefile.in b/lustre/tests/Makefile.in
index 9ff38a8..fdc6785 100644
--- a/lustre/tests/Makefile.in
+++ b/lustre/tests/Makefile.in
@@ -300,8 +300,8 @@ AM_CFLAGS = $(LLCFLAGS)
 # LDADD := -lreadline -ltermcap # -lefence
 DIST_SUBDIRS := mpi
 
-noinst_DATA = disk1_4.zip
-noinst_SCRIPTS = leak_finder.pl llmount.sh llmountcleanup.sh functions.sh test-framework.sh runvmstat runiozone runtests sanity.sh rundbench acceptance-small.sh compile.sh conf-sanity.sh insanity.sh lfscktest.sh oos.sh oos2.sh llog-test.sh recovery-small.sh replay-dual.sh sanity-quota.sh replay-ost-single.sh replay-single.sh run-llog.sh sanityN.sh large-scale.sh runracer performance-sanity.sh mdsrate-create-small.sh mdsrate-create-large.sh mdsrate-lookup-1dir.sh mdsrate-lookup-10dirs.sh mdsrate-stat-small.sh mdsrate-stat-large.sh replay-vbr.sh lockorder.sh socketclient socketserver runmultiop_bg_pause recovery-mds-scale.sh run_dd.sh run_tar.sh run_iozone.sh run_dbench.sh run_IOR.sh recovery-double-scale.sh recovery-random-scale.sh parallel-scale.sh
+noinst_DATA = disk1_6.tar.bz2
+noinst_SCRIPTS = leak_finder.pl llmount.sh llmountcleanup.sh functions.sh test-framework.sh runvmstat runiozone runtests sanity.sh rundbench acceptance-small.sh compile.sh conf-sanity.sh insanity.sh lfscktest.sh oos.sh oos2.sh llog-test.sh recovery-small.sh replay-dual.sh sanity-quota.sh replay-ost-single.sh replay-single.sh run-llog.sh sanityN.sh large-scale.sh runracer performance-sanity.sh mdsrate-create-small.sh mdsrate-create-large.sh mdsrate-lookup-1dir.sh mdsrate-lookup-10dirs.sh mdsrate-stat-small.sh mdsrate-stat-large.sh replay-vbr.sh lockorder.sh socketclient socketserver runmultiop_bg_pause recovery-mds-scale.sh run_dd.sh run_tar.sh run_iozone.sh run_dbench.sh run_IOR.sh recovery-double-scale.sh recovery-random-scale.sh parallel-scale.sh ost-pools.sh rpc.sh
 nobase_noinst_SCRIPTS = cfg/local.sh acl/make-tree acl/run cfg/ncli.sh racer/dir_create.sh racer/file_create.sh racer/file_list.sh racer/file_rm.sh racer/racer.sh racer/file_concat.sh racer/file_link.sh racer/file_rename.sh racer/file_symlink.sh
 nobase_noinst_DATA = acl/cp.test acl/getfacl-noacl.test acl/inheritance.test acl/misc.test acl/permissions.test acl/setfacl.test
 
diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh
index 8d8cc8d..0c272d8 100755
--- a/lustre/tests/acceptance-small.sh
+++ b/lustre/tests/acceptance-small.sh
@@ -23,7 +23,7 @@ fi
 [ "$DEBUG_OFF" ] || DEBUG_OFF="eval lctl set_param debug=\"$DEBUG_LVL\""
 [ "$DEBUG_ON" ] || DEBUG_ON="eval lctl set_param debug=0x33f0484"
 
-export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE RACER REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL REPLAY_VBR INSANITY SANITY_QUOTA PERFORMANCE_SANITY LARGE_SCALE RECOVERY_MDS_SCALE RECOVERY_DOUBLE_SCALE RECOVERY_RANDOM_SCALE PARALLEL_SCALE"
+export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE RACER REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL REPLAY_VBR INSANITY SANITY_QUOTA PERFORMANCE_SANITY LARGE_SCALE RECOVERY_MDS_SCALE RECOVERY_DOUBLE_SCALE RECOVERY_RANDOM_SCALE PARALLEL_SCALE OST_POOLS"
 
 if [ "$ACC_SM_ONLY" ]; then
     for O in $TESTSUITE_LIST; do
@@ -50,6 +50,8 @@ FORMAT=${FORMAT:-formatall}
 CLEANUP=${CLEANUP:-stopall}
 
 setup_if_needed() {
+    nfs_client_mode && return
+
     local MOUNTED=$(mounted_lustre_filesystems)
     if $(echo $MOUNTED | grep -w -q $MOUNT); then
         check_config $MOUNT
@@ -459,6 +461,14 @@ if [ "$PARALLEL_SCALE" != "no" ]; then
         PARALLEL_SCALE="done"
 fi
 
+[ "$OST_POOLS" != "no" ] && skip_remmds ost-pools && OST_POOLS=no && MSKIPPED=1
+[ "$OST_POOLS" != "no" ] && skip_remost ost-pools && OST_POOLS=no && OSKIPPED=1
+if [ "$OST_POOLS" != "no" ]; then
+        title ost-pools
+        bash ost-pools.sh
+        OST_POOLS="done"
+fi
+
 RC=$?
 title FINISHED
 echo "Finished at `date` in $((`date +%s` - $STARTTIME))s"
diff --git a/lustre/tests/cfg/local.sh b/lustre/tests/cfg/local.sh
index 7b1f550..34d5789 100644
--- a/lustre/tests/cfg/local.sh
+++ b/lustre/tests/cfg/local.sh
@@ -94,3 +94,5 @@ POWER_DOWN=${POWER_DOWN:-"powerman --off"}
 POWER_UP=${POWER_UP:-"powerman --on"}
 SLOW=${SLOW:-no}
 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
+SHARED_DIR_LOGS=${SHARED_DIR_LOGS:-""}
+
diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh
index a07e9b2..2750528 100644
--- a/lustre/tests/conf-sanity.sh
+++ b/lustre/tests/conf-sanity.sh
@@ -970,11 +970,14 @@ test_32a() {
 	[ "$NETTYPE" = "tcp" ] || { skip "NETTYPE != tcp" && return 0; }
 	[ -z "$TUNEFS" ] && skip "No tunefs" && return 0
 
-	local DISK1_4=$LUSTRE/tests/disk1_4.zip
-	[ ! -r $DISK1_4 ] && skip "Cant find $DISK1_4, skipping" && return
+	local DISK1_6=$LUSTRE/tests/disk1_6.tar.bz2
+	[ ! -r $DISK1_6 ] && skip "Cant find $DISK1_6, skipping" && return
 
 	local tmpdir=$TMP/conf32a
-	unzip -o -j -d $tmpdir $DISK1_4 || { skip "Cant unzip $DISK1_4, skipping" && return ; }
+	mkdir -p $tmpdir
+
+	tar xjvf $DISK1_6 -C $tmpdir ||
+		{ skip "Cant untar $DISK1_6, skipping" && return ; }
 	load_modules
 	lctl set_param debug=$PTLDEBUG
 
@@ -986,19 +989,19 @@ test_32a() {
 
 	local UUID=$(lctl get_param -n mds.lustre-MDT0000.uuid)
 	echo MDS uuid $UUID
-	[ "$UUID" == "mdsA_UUID" ] || error "UUID is wrong: $UUID"
+	[ "$UUID" == "lustre-MDT0000_UUID" ] || error "UUID is wrong: $UUID"
 
 	$TUNEFS --mgsnode=`hostname` $tmpdir/ost1 || error "tunefs failed"
 	start32 ost1 $tmpdir/ost1 "-o loop" || return 5
 	UUID=$(lctl get_param -n obdfilter.lustre-OST0000.uuid)
 	echo OST uuid $UUID
-	[ "$UUID" == "ost1_UUID" ] || error "UUID is wrong: $UUID"
+	[ "$UUID" == "lustre-OST0000_UUID" ] || error "UUID is wrong: $UUID"
 
 	local NID=$($LCTL list_nids | head -1)
 
-	echo "OSC changes should return err:"
-	$LCTL conf_param lustre-OST0000.osc.max_dirty_mb=15 && return 7
-	$LCTL conf_param lustre-OST0000.failover.node=$NID && return 8
+	echo "OSC changes should succeed:"
+	$LCTL conf_param lustre-OST0000.osc.max_dirty_mb=15 || return 7
+	$LCTL conf_param lustre-OST0000.failover.node=$NID || return 8
 	echo "ok."
 	echo "MDC changes should succeed:"
 	$LCTL conf_param lustre-MDT0000.mdc.max_rpcs_in_flight=9 || return 9
@@ -1017,7 +1020,7 @@ test_32a() {
 
 	rm -rf $tmpdir || true	# true is only for TMP on NFS
 }
-run_test 32a "Upgrade from 1.4 (not live)"
+run_test 32a "Upgrade from 1.6 (not live)"
 
 test_32b() {
 	# this test is totally useless on a client-only system
@@ -1025,59 +1028,70 @@ test_32b() {
 	[ "$NETTYPE" = "tcp" ] || { skip "NETTYPE != tcp" && return 0; }
 	[ -z "$TUNEFS" ] && skip "No tunefs" && return
 
-	local DISK1_4=$LUSTRE/tests/disk1_4.zip
-	[ ! -r $DISK1_4 ] && skip "Cant find $DISK1_4, skipping" && return
+	local DISK1_6=$LUSTRE/tests/disk1_6.tar.bz2
+	[ ! -r $DISK1_6 ] && skip "Cant find $DISK1_6, skipping" && return
 
 	local tmpdir=$TMP/conf32b
-	unzip -o -j -d $tmpdir $DISK1_4 || { skip "Cant unzip $DISK1_4, skipping" && return ; }
+        mkdir -p $tmpdir
+
+        tar xjvf $DISK1_6 -C $tmpdir ||
+                { skip "Cant untar $DISK1_6, skipping" && return ; }
+
 	load_modules
 	lctl set_param debug=$PTLDEBUG
-	local NEWNAME=sofia
 
+	# Ugrade process in according to comment 2 bug 20246
 	# writeconf will cause servers to register with their current nids
-	$TUNEFS --writeconf --fsname=$NEWNAME $tmpdir/mds || error "tunefs failed"
-	start32 mds $tmpdir/mds "-o loop" && \
+	$TUNEFS --mdt --writeconf --erase-param \
+		--param="mdt.group_upcall=/usr/sbin/l_getgroups" $tmpdir/mds || \
+		error "tunefs mds failed"
+
+	start32 mds $tmpdir/mds "-o loop,abort_recov" && \
 		trap cleanup_32 EXIT INT || return 3
 
-	local UUID=$(lctl get_param -n mds.${NEWNAME}-MDT0000.uuid)
+	stop32 mds
+	start32 mds "-o loop" $tmpdir/mds || return 4
+	local UUID=$(lctl get_param -n mds.lustre-MDT0000.uuid)
 	echo MDS uuid $UUID
-	[ "$UUID" == "mdsA_UUID" ] || error "UUID is wrong: $UUID"
+	[ "$UUID" == "lustre-MDT0000_UUID" ] || error "UUID is wrong: $UUID"
 
-	$TUNEFS --mgsnode=`hostname` --fsname=$NEWNAME --writeconf $tmpdir/ost1 || error "tunefs failed"
-	start32 ost1 $tmpdir/ost1 "-o loop" || return 5
-	UUID=$(lctl get_param -n obdfilter.${NEWNAME}-OST0000.uuid)
+	$TUNEFS --ost --writeconf  --erase-param --mgsnode=`hostname`@$NETTYPE $tmpdir/ost1 || \
+		error "tunefs ost failed"
+	start32 ost1 $tmpdir/ost1 "-o loop,abort_recov" || return 5
+
+	UUID=$(lctl get_param -n obdfilter.lustre-OST0000.uuid)
 	echo OST uuid $UUID
-	[ "$UUID" == "ost1_UUID" ] || error "UUID is wrong: $UUID"
+	[ "$UUID" == "lustre-OST0000_UUID" ] || error "UUID is wrong: $UUID"
 
 	echo "OSC changes should succeed:"
-	$LCTL conf_param ${NEWNAME}-OST0000.osc.max_dirty_mb=15 || return 7
-	$LCTL conf_param ${NEWNAME}-OST0000.failover.node=$NID || return 8
+	$LCTL conf_param lustre-OST0000.osc.max_dirty_mb=15 || return 7
+	$LCTL conf_param lustre-OST0000.failover.node=$NID || return 8
 	echo "ok."
 	echo "MDC changes should succeed:"
-	$LCTL conf_param ${NEWNAME}-MDT0000.mdc.max_rpcs_in_flight=9 || return 9
+	$LCTL conf_param lustre-MDT0000.mdc.max_rpcs_in_flight=9 || return 9
 	echo "ok."
 
 	# MDT and OST should have registered with new nids, so we should have
 	# a fully-functioning client
 	echo "Check client and old fs contents"
 
-	local device=`h2$NETTYPE $HOSTNAME`:/$NEWNAME
+	local device=`h2$NETTYPE $HOSTNAME`:/lustre
 	echo "Starting local client: $HOSTNAME: $device $MOUNT"
 	mount -t lustre $device $MOUNT || return 1
 
 	local old=$(lctl get_param -n mdc.*.max_rpcs_in_flight)
 	local new=$((old + 5))
-	lctl conf_param ${NEWNAME}-MDT0000.mdc.max_rpcs_in_flight=$new
+	lctl conf_param lustre-MDT0000.mdc.max_rpcs_in_flight=$new
 	wait_update $HOSTNAME "lctl get_param -n mdc.*.max_rpcs_in_flight" $new || return 11
 
-	[ "$(cksum $MOUNT/passwd | cut -d' ' -f 1,2)" == "2479747619 779" ] || return 12
+	[ "$(cksum $MOUNT/passwd | cut -d' ' -f 1,2)" == "2940530074 2837" ] || return 12
 	echo "ok."
 
 	cleanup_32
 
 	rm -rf $tmpdir || true  # true is only for TMP on NFS
 }
-run_test 32b "Upgrade from 1.4 with writeconf"
+run_test 32b "Upgrade from 1.6 with writeconf"
 
 test_33a() { # bug 12333, was test_33
         local rc=0
@@ -1502,8 +1516,27 @@ test_45() { #17310
 }
 run_test 45 "long unlink handling in ptlrpcd"
 
+cleanup_46a() {
+	trap 0
+	local rc=0
+	local count=$1
+
+	umount_client $MOUNT2 || rc=$?
+	umount_client $MOUNT || rc=$?
+	while [ $count -gt 0 ]; do
+		stop ost${count} -f || rc=$?
+		let count=count-1
+	done	
+	stop_mds || rc=$? 
+	# writeconf is needed after the test, otherwise,
+	# we might end up with extra OSTs
+	writeconf || rc=$?
+	cleanup_nocli || rc=$?
+	return $rc
+}
+
 test_46a() {
-	OSTCOUNT=6
+	echo "Testing with $OSTCOUNT OSTs"
 	reformat
 	start_mds || return 1
 	#first client should see only one ost
@@ -1511,15 +1544,18 @@ test_46a() {
 	wait_osc_import_state mds ost FULL
 	#start_client
 	mount_client $MOUNT || return 3
+	trap "cleanup_46a $OSTCOUNT" EXIT ERR
+
+	local i 
+	for (( i=2; i<=$OSTCOUNT; i++ )); do
+	    start ost$i `ostdevname $i` $OST_MOUNT_OPTS || return $((i+2))
+	done
+
+	# wait until osts in sync
+	for (( i=2; i<=$OSTCOUNT; i++ )); do
+	    wait_osc_import_state mds ost$i FULL
+	done
 
-	start_ost2 || return 4
-	start ost3 `ostdevname 3` $OST_MOUNT_OPTS || return 5
-	start ost4 `ostdevname 4` $OST_MOUNT_OPTS || return 6
-	start ost5 `ostdevname 5` $OST_MOUNT_OPTS || return 7
-        wait_osc_import_state mds ost2 FULL
-        wait_osc_import_state mds ost3 FULL
-        wait_osc_import_state mds ost4 FULL
-        wait_osc_import_state mds ost5 FULL
         #second client see all ost's
 
 	mount_client $MOUNT2 || return 8
@@ -1536,14 +1572,8 @@ test_46a() {
 	# will be deadlock
 	stat $MOUNT/widestripe || return 12
 
-	umount_client $MOUNT2 || return 13
-	umount_client $MOUNT || return 14
-	stop ost5 -f || return 20
-	stop ost4 -f || return 21
-	stop ost3 -f || return 22
-	stop_ost2 || return 23
-	stop_ost || return 24
-	stop_mds || return 25
+	cleanup_46a $OSTCOUNT || { echo "cleanup_46a failed!" && return 13; }
+	return 0
 }
 run_test 46a "handle ost additional - wide striped file"
 
diff --git a/lustre/tests/disk1_4.zip b/lustre/tests/disk1_4.zip
deleted file mode 100644
index 0970c83..0000000
Binary files a/lustre/tests/disk1_4.zip and /dev/null differ
diff --git a/lustre/tests/disk1_6.tar.bz2 b/lustre/tests/disk1_6.tar.bz2
new file mode 100644
index 0000000..84beec2
Binary files /dev/null and b/lustre/tests/disk1_6.tar.bz2 differ
diff --git a/lustre/tests/mdsrate-create-large.sh b/lustre/tests/mdsrate-create-large.sh
index c78ce9a..5201349 100644
--- a/lustre/tests/mdsrate-create-large.sh
+++ b/lustre/tests/mdsrate-create-large.sh
@@ -43,7 +43,7 @@ $LFS setstripe $TESTDIR -c -1
 get_stripe $TESTDIR
 
 # Make sure we start with a clean slate
-rm -f ${LOG} PI*
+rm -f ${LOG}
 
 if [ -n "$NOSINGLE" ]; then
     echo "NO Test for creates for a single client."
diff --git a/lustre/tests/mdsrate-create-small.sh b/lustre/tests/mdsrate-create-small.sh
index 4babb26..b5db20f 100644
--- a/lustre/tests/mdsrate-create-small.sh
+++ b/lustre/tests/mdsrate-create-small.sh
@@ -34,7 +34,7 @@ fi
 [ ! -x ${MDSRATE} ] && error "${MDSRATE} not built."
 
 # Make sure we start with a clean slate
-rm -f ${LOG} PI*
+rm -f ${LOG}
 
 log "===== $0 ====== " 
 
diff --git a/lustre/tests/ost-pools.sh b/lustre/tests/ost-pools.sh
new file mode 100644
index 0000000..5d9e9e2
--- /dev/null
+++ b/lustre/tests/ost-pools.sh
@@ -0,0 +1,1324 @@
+#!/bin/bash
+#
+# Run select tests by setting ONLY, or as arguments to the script.
+# Skip specific tests by setting EXCEPT.
+#
+# Run test by setting NOSETUP=true when ltest has setup env for us
+
+SRCDIR=`dirname $0`
+export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin
+
+ONLY=${ONLY:-"$*"}
+ALWAYS_EXCEPT="$OST_POOLS_EXCEPT"
+# bug number for skipped test: -
+# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
+
+[ "$ALWAYS_EXCEPT$EXCEPT" ] && \
+        echo "Skipping tests: `echo $ALWAYS_EXCEPT $EXCEPT`"
+
+TMP=${TMP:-/tmp}
+ORIG_PWD=${PWD}
+
+LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+. $LUSTRE/tests/test-framework.sh
+init_test_env $@
+. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+
+check_and_setup_lustre
+
+DIR=${DIR:-$MOUNT}
+assert_DIR
+
+POOLSLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
+[ "$POOLSLOG" ] && rm -f $POOLSLOG || true
+build_test_filter
+
+FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
+
+LFS=${LFS:-lfs}
+LCTL=${LCTL:-lctl}
+SETSTRIPE=${SETSTRIPE:-"$LFS setstripe"}
+GETSTRIPE=${GETSTRIPE:-"$LFS getstripe"}
+
+
+TSTUSR=${TSTUSR:-"quota_usr"}
+TSTID=${TSTID:-60000}
+RUNAS="runas -u $TSTID -g $TSTID"
+
+# OST pools tests
+POOL=${POOL:-pool1}
+POOL2=${POOL2:-pool2}
+POOL3=${POOL3:-pool3}
+NON_EXISTANT_POOL=nonexistantpool
+NON_EXISTANT_FS=nonexistantfs
+INVALID_POOL=some_invalid_pool_name
+TGT_COUNT=$OSTCOUNT
+TGT_FIRST=0
+TGT_MAX=$((TGT_COUNT-1))
+TGT_STEP=1
+TGT_LIST=$(seq $TGT_FIRST $TGT_STEP $TGT_MAX)
+TGT_LIST2=$(seq $TGT_FIRST 2 $TGT_MAX)
+
+TGT_ALL="$FSNAME-OST[$TGT_FIRST-$TGT_MAX/1]"
+TGT_HALF="$FSNAME-OST[$TGT_FIRST-$TGT_MAX/2]"
+
+TGT_UUID=$(for i in $TGT_LIST; do printf "$FSNAME-OST%04x_UUID " $i; done)
+TGT_UUID2=$(for i in $TGT_LIST2; do printf "$FSNAME-OST%04x_UUID " $i; done)
+
+create_dir() {
+    local dir=$1
+    local pool=$2
+    local count=${3:-"-1"}
+    local idx=$4
+
+    mkdir -p $dir
+    if [[ -n $4 ]]; then
+        $SETSTRIPE -c $count -p $pool $dir -o $idx
+    else
+        $SETSTRIPE -c $count -p $pool $dir
+    fi
+    [[ $? -eq 0 ]] || \
+        error "$SETSTRIPE -p $pool $dir failed."
+}
+
+create_file() {
+    local file=$1
+    local pool=$2
+    local count=${3:-"-1"}
+    local index=${4:-"-1"}
+    rm -f $file
+    $SETSTRIPE -o $index -c $count -p $pool $file
+    [[ $? -eq 0 ]] || \
+        error "$SETSTRIPE -p $pool $file failed."
+}
+
+osts_in_pool() {
+    local pool=$1
+    local res
+    for i in $(do_facet mds lctl pool_list $FSNAME.$pool | grep -v "^Pool:" \
+        | sed -e 's/_UUID$//;s/^.*-OST//'); do
+      res="$res $(printf "%d" 0x$i)"
+    done
+    echo $res
+}
+
+check_dir_in_pool() {
+    local dir=$1
+    local pool=$2
+    local res=$($GETSTRIPE $dir | grep "^stripe_count:" \
+        | cut -d ':' -f 5 | tr -d "[:blank:]")
+    if [[ "$res" == "$pool" ]]; then
+        return 0
+    else
+        error found $res instead of $pool
+        return 1
+    fi
+}
+
+check_file_in_pool() {
+    local osts=$(osts_in_pool $2)
+    check_file_in_osts $1 "$osts" $3
+}
+
+check_file_in_osts() {
+        local file=$1
+        local pool_list=${2:-$TGT_LIST}
+        local count=$3
+        local res=$($GETSTRIPE $file | grep 0x | cut -f2)
+        local i
+        for i in $res
+        do
+                found=$(echo :$pool_list: | tr " " ":"  | grep :$i:)
+                if [[ "$found" == "" ]]; then
+                        echo "pool list: $pool_list"
+                        echo "striping: $res"
+                        $GETSTRIPE $file
+                        error "$file not allocated from OSTs $pool_list."
+                        return 1
+                fi
+        done
+
+        local ost_count=$($GETSTRIPE $file | grep 0x | wc -l)
+        [[ -n "$count" ]] && [[ $ost_count -ne $count ]] && \
+            error "Stripe count $count expected; got $ost_count"
+                
+        return 0
+}
+
+check_file_not_in_pool() {
+    local file=$1
+    local pool=$2
+    local res=$($GETSTRIPE -v $file | grep "^lmm_pool_name:" | tr -d "[:blank:]" | cut -f 2 -d ':')
+    if [[ "$res" == "$pool" ]]; then
+        error "File $file is in pool: $res"
+        return 1
+    else
+        return 0
+    fi
+}
+
+check_dir_not_in_pool() {
+    local dir=$1
+    local pool=$2
+    local res=$($GETSTRIPE -v $dir | grep "^stripe_count" | head -1 | cut -f 8 -d ' ')
+    if [[ "$res" == "$pool" ]]; then
+        error "File $dir is in pool: $res"
+        return 1
+    else
+        return 0
+    fi
+}
+
+create_pool() {
+    do_facet mds lctl pool_new $FSNAME.$1
+    local RC=$?
+    # get param should return err until pool is created
+    [[ $RC -ne 0 ]] && return $RC
+
+    wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$1 \
+        2>/dev/null || echo foo" "" || RC=1
+    [[ $RC -ne 0 ]] && error "pool_new failed"
+    return $RC
+}
+
+drain_pool() {
+    pool=$1
+    wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$pool" ""\
+        ||error "Failed to remove targets from pool: $pool"
+}
+
+destroy_pool_int() {
+      OSTS=$(do_facet mds lctl pool_list $1 | awk '$1 !~ /^Pool:/ {print $1}')
+      for ost in $OSTS
+      do
+        do_facet mds lctl pool_remove $1 $ost
+      done
+      do_facet mds lctl pool_destroy $1
+}
+
+destroy_pool() {
+    local RC
+
+    do_facet mds lctl pool_list $FSNAME.$1
+    RC=$?
+    [[ $RC -ne 0 ]] && return $RC
+
+    destroy_pool_int $FSNAME.$1
+    RC=$?
+    [[ $RC -ne 0 ]] && return $RC
+
+    wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$1 \
+      2>/dev/null || echo foo" "foo" && return 0
+}
+
+add_pool() {
+    local pool=$1
+    local osts=$2
+    local tgt="${3}$(lctl get_param -n lov.$FSNAME-*.pools.$pool | sort -u | tr '\n' ' ')"
+
+    do_facet mds lctl pool_add $FSNAME.$pool $osts
+    local RC=$?
+    [[ $RC -ne 0 ]] && return $RC
+
+    wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$pool | sort -u | tr '\n' ' ' " "$tgt" || RC=1
+    [[ $RC -ne 0 ]] && error "pool_add failed: $1; $2"
+    return $RC
+}
+
+create_pool_nofail() {
+    create_pool $1
+    if [[ $? != 0 ]]
+    then
+        error "Pool creation of $1 failed"
+    fi
+}
+
+create_pool_fail() {
+    create_pool $1
+    if [[ $? == 0 ]]
+    then
+        error "Pool creation of $1 succeeded; should have failed"
+    fi
+}
+
+cleanup_tests() {
+    # Destroy pools from previous test runs
+    for p in $(do_facet mds lctl pool_list $FSNAME | grep $FSNAME.pool[0-$OSTCOUNT]); do
+        destroy_pool_int $p;
+    done
+    rm -rf $DIR/d0.${TESTSUITE}
+}
+
+ost_pools_init() {
+    cleanup_tests
+}
+
+
+# Initialization
+remote_mds_nodsh && skip "remote MDS with nodsh" && exit 0
+remote_ost_nodsh && skip "remote OST with nodsh" && exit 0
+ost_pools_init
+
+# Tests for new commands added
+
+test_1() {
+    echo "Creating a pool with a 1 character pool name"
+    create_pool_nofail p
+
+    echo "Creating a pool with a 10 character pool name"
+    create_pool_nofail p123456789
+    destroy_pool p123456789
+
+    echo "Creating a pool with a 16 character pool name"
+    create_pool_nofail p123456789123456
+    destroy_pool p123456789123456
+
+    echo "Creating a pool with a 17 character pool name; should fail"
+    create_pool_fail p1234567891234567
+
+    echo "Creating a pool with a 1000 character pool name; should fail"
+    NAME="p"
+    for i in `seq 1 999`; do NAME=${NAME}"o"; done
+    create_pool_fail $NAME
+
+    echo "pool_new should fail if fs-name or poolname are missing."
+    do_facet mds lctl pool_new .pool1
+    [[ $? -ne 0 ]] || \
+        error "pool_new did not fail even though fs-name was missing."
+    do_facet mds lctl pool_new pool1
+    [[ $? -ne 0 ]] || \
+        error "pool_new did not fail even though fs-name was missing."
+    do_facet mds lctl pool_new ${FSNAME}.
+    [[ $? -ne 0 ]] || \
+        error "pool_new did not fail even though pool name was missing."
+    do_facet mds lctl pool_new .
+    [[ $? -ne 0 ]] || \
+        error "pool_new did not fail even though pool name and fs-name " \
+            "were missing."
+    do_facet mds lctl pool_new ${FSNAME},pool1
+    [[ $? -ne 0 ]] || \
+        error "pool_new did not fail even though pool name format was wrong"
+    do_facet mds lctl pool_new ${FSNAME}/pool1
+    [[ $? -ne 0 ]] || \
+        error "pool_new did not fail even though pool name format was wrong"
+
+    do_facet mds lctl pool_new ${FSNAME}.p
+    [[ $? -ne 0 ]] || \
+        error "pool_new did not fail even though pool1 existed"
+    destroy_pool p
+
+}
+run_test 1 "Test lctl pool_new  ========================================="
+
+test_2a() {
+    destroy_pool $POOL
+
+    do_facet mds lctl pool_add $FSNAME.$POOL $FSNAME-OST0000
+    [[ $? -ne 0 ]] || \
+        error_ignore 19889 " pool_add did not fail even though pool did " \
+        " not exist."
+}
+run_test 2a "pool_add: non-existant pool"
+
+test_2b() {
+    do_facet mds lctl pool_add $FSNAME.p1234567891234567890 $FSNAME-OST0000
+    [[ $? -ne 0 ]] || \
+        error "pool_add did not fail even though pool name was invalid."
+}
+run_test 2b "pool_add: Invalid pool name"
+
+# Testing various combinations of OST name list
+test_2c() {
+    local TGT
+    local RC
+
+    lctl get_param -n lov.$FSNAME-*.pools.$POOL 2>/dev/null
+    [[ $? -ne 0 ]] || \
+        destroy_pool $POOL
+
+    create_pool_nofail $POOL
+
+    # 1. OST0000
+    do_facet mds lctl pool_add $FSNAME.$POOL OST0000
+    RC=$?; [[ $RC -eq 0 ]] || \
+        error "pool_add failed. $FSNAME $POOL OST0000: $RC"
+    do_facet mds lctl pool_remove $FSNAME.$POOL OST0000
+    drain_pool $POOL
+
+    # 2. lustre-OST0000
+    do_facet mds lctl pool_add $FSNAME.$POOL $FSNAME-OST0000
+    RC=$?; [[ $RC -eq 0 ]] || \
+        error "pool_add failed. $FSNAME $POOL $FSNAME-OST0000: $RC"
+    do_facet mds lctl pool_remove $FSNAME.$POOL $FSNAME-OST0000
+    drain_pool $POOL
+
+    # 3. lustre-OST0000_UUID
+    do_facet mds lctl pool_add $FSNAME.$POOL $FSNAME-OST0000_UUID
+    RC=$?; [[ $RC -eq 0 ]] || \
+        error "pool_add failed. $FSNAME $POOL $FSNAME-OST0000_UUID: $RC"
+    do_facet mds lctl pool_remove $FSNAME.$POOL $FSNAME-OST0000_UUID
+    drain_pool $POOL
+
+    # 4. lustre-OST[0,1,2,3,]
+    TGT="$FSNAME-OST["
+    for i in $TGT_LIST; do TGT=${TGT}$(printf "$i," $i); done
+    TGT="${TGT}]"
+    do_facet mds lctl pool_add $FSNAME.$POOL $TGT
+    [[ $? -eq 0 ]] || \
+        error "pool_add failed. $FSNAME.$POOL $TGT. $RC"
+    do_facet mds lctl pool_remove $FSNAME.$POOL $TGT
+    drain_pool $POOL
+
+    # 5. lustre-OST[0-5/1]
+    do_facet mds lctl pool_add $FSNAME.$POOL $TGT_ALL
+    RC=$?; [[ $RC -eq 0 ]] || \
+        error "pool_add failed. $FSNAME $POOL" "$TGT_ALL $RC"
+    wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL | \
+      sort -u | tr '\n' ' ' " "$TGT_UUID" || error "Add to pool failed"
+    do_facet mds lctl pool_remove $FSNAME.$POOL $TGT_ALL
+    drain_pool $POOL
+
+    destroy_pool $POOL
+}
+run_test 2c "pool_add: OST index combinations ==========================="
+
+test_2d() {
+    local TGT
+    local RC
+
+    lctl get_param -n lov.$FSNAME-*.pools.$POOL 2>/dev/null
+    [[ $? -ne 0 ]] || \
+        destroy_pool $POOL
+
+    create_pool_nofail $POOL
+
+    TGT=$(printf "$FSNAME-OST%04x_UUID " $OSTCOUNT)
+    do_facet mds lctl pool_add $FSNAME.$POOL $TGT
+    RC=$?; [[ $RC -ne 0 ]] || \
+        error_ignore 19889 "pool_add succeeded for an OST ($TGT) that does " \
+        "not exist."
+
+    destroy_pool $POOL
+}
+run_test 2d "pool_add: OSTs that don't exist should be rejected ========"
+
+test_2e() {
+    local TGT
+    local RC
+    local RESULT
+
+    $LCTL get_param -n lov.$FSNAME-*.pools.$POOL 2>/dev/null
+    [[ $? -ne 0 ]] || \
+        destroy_pool $POOL
+
+    create_pool_nofail $POOL
+
+    TGT="$FSNAME-OST0000_UUID "
+    do_facet mds lctl pool_add $FSNAME.$POOL $TGT
+    wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL | \
+      sort -u | tr '\n' ' ' " "$TGT" || error "Add to pool failed"
+    RESULT=$(do_facet mds "LOCALE=C $LCTL pool_add $FSNAME.$POOL $TGT 2>&1")
+    RC=$?
+    echo $RESULT
+
+    [[ $RC -ne 0 ]] || \
+        error_ignore 19889 "pool_add succeeded for an OST that was already " \
+        "in the pool."
+
+    [[ $(grep "already in pool" <<< $RESULT) ]] || \
+        error_ignore 19889 "pool_add failed as expected but error message " \
+        "not as expected."
+
+    destroy_pool $POOL
+}
+run_test 2e "pool_add: OST already in a pool should be rejected ========"
+
+test_3a() {
+    lctl get_param -n lov.$FSNAME-*.pools.$POOL 2>/dev/null
+    [[ $? -ne 0 ]] || \
+        destroy_pool $POOL
+
+    do_facet mds lctl pool_remove $FSNAME.$POOL $FSNAME-OST0000
+    [[ $? -ne 0 ]] || \
+        error_ignore 19889 "pool_remove did not fail even though" \
+        "pool did not exist."
+}
+run_test 3a "pool_remove: non-existant pool"
+
+test_3b() {
+    do_facet mds lctl pool_remove ${NON_EXISTANT_FS}.$POOL OST0000
+    [[ $? -ne 0 ]] || \
+        error_ignore 19889 "pool_remove did not fail even though fsname " \
+        "did not exist."
+}
+run_test 3b "pool_remove: non-existant fsname"
+
+test_3c() {
+    do_facet mds lctl pool_remove $FSNAME.p1234567891234567890 $FSNAME-OST0000
+    [[ $? -ne 0 ]] || \
+        error "pool_remove did not fail even though pool name was invalid."
+}
+run_test 3c "pool_remove: Invalid pool name"
+
+
+# Testing various combinations of OST name list
+test_3d() {
+    lctl get_param -n lov.$FSNAME-*.pools.$POOL 2>/dev/null
+    [[ $? -ne 0 ]] || \
+        destroy_pool $POOL
+
+    create_pool_nofail $POOL
+    do_facet mds lctl pool_add $FSNAME.$POOL OST0000
+    do_facet mds lctl pool_remove $FSNAME.$POOL OST0000
+    [[ $? -eq 0 ]] || \
+        error "pool_remove failed. $FSNAME $POOL OST0000"
+    drain_pool $POOL
+
+    do_facet mds lctl pool_add $FSNAME.$POOL $FSNAME-OST0000
+    do_facet mds lctl pool_remove $FSNAME.$POOL $FSNAME-OST0000
+    [[ $? -eq 0 ]] || \
+        error "pool_remove failed. $FSNAME $POOL $FSNAME-OST0000"
+    drain_pool $POOL
+
+    do_facet mds lctl pool_add $FSNAME.$POOL $FSNAME-OST0000_UUID
+    do_facet mds lctl pool_remove $FSNAME.$POOL $FSNAME-OST0000_UUID
+    [[ $? -eq 0 ]] || \
+        error "pool_remove failed. $FSNAME $POOL $FSNAME-OST0000_UUID"
+    drain_pool $POOL
+
+    add_pool $POOL $TGT_ALL "$TGT_UUID"
+    do_facet mds lctl pool_remove $FSNAME.$POOL $TGT_ALL
+    [[ $? -eq 0 ]] || \
+        error "pool_remove failed. $FSNAME $POOL" $TGT_ALL
+    drain_pool $POOL
+
+    destroy_pool $POOL
+}
+run_test 3d "pool_remove: OST index combinations ==========================="
+
+test_4a() {
+    lctl get_param -n lov.$FSNAME-*.pools.$POOL 2>/dev/null
+    [[ $? -ne 0 ]] || \
+        destroy_pool $POOL
+
+    do_facet mds lctl pool_destroy $FSNAME.$POOL
+    [[ $? -ne 0 ]] || \
+        error "pool_destroy did not fail even though pool did not exist."
+}
+run_test 4a "pool_destroy: non-existant pool"
+
+test_4b() {
+    do_facet mds lctl pool_destroy ${NON_EXISTANT_FS}.$POOL
+    [[ $? -ne 0 ]] || \
+        error "pool_destroy did not fail even though the filesystem did not exist."
+}
+run_test 4b "pool_destroy: non-existant fs-name"
+
+test_4c() {
+    create_pool_nofail $POOL
+    add_pool $POOL "OST0000" "$FSNAME-OST0000_UUID "
+
+    do_facet mds lctl pool_destroy ${FSNAME}.$POOL
+    [[ $? -ne 0 ]] || \
+        error "pool_destroy succeeded with a non-empty pool name."
+    destroy_pool $POOL
+}
+run_test 4c "pool_destroy: non-empty pool ==============================="
+
+sub_test_5() {
+    local LCMD=$1
+
+    $LCMD pool_list
+    [[ $? -ne 0 ]] || \
+        error "pool_list did not fail even though fsname was not mentioned."
+
+    destroy_pool $POOL
+    destroy_pool $POOL2
+
+    create_pool_nofail $POOL
+    create_pool_nofail $POOL2
+    $LCMD pool_list $FSNAME
+    [[ $? -eq 0 ]] || \
+        error "pool_list $FSNAME failed."
+
+    do_facet mds lctl pool_add $FSNAME.$POOL $TGT_ALL
+
+    $LCMD pool_list $FSNAME.$POOL
+    [[ $? -eq 0 ]] || \
+        error "pool_list $FSNAME.$POOL failed."
+
+    $LCMD pool_list ${NON_EXISTANT_FS}
+    [[ $? -ne 0 ]] || \
+        error "pool_list did not fail for a non-existant fsname $NON_EXISTANT_FS"
+
+    $LCMD pool_list ${FSNAME}.$NON_EXISTANT_POOL
+    [[ $? -ne 0 ]] || \
+        error "pool_list did not fail for a non-existant pool $NON_EXISTANT_POOL"
+
+    if [[ ! $(grep mds <<< $LCMD) ]]; then
+        echo $LCMD pool_list $DIR
+        $LCMD pool_list $DIR
+        [[ $? -eq 0 ]] || \
+            error "pool_list failed for $DIR"
+
+        mkdir -p ${DIR}/d1
+        $LCMD pool_list ${DIR}/d1
+        [[ $? -eq 0 ]] || \
+            error "pool_list failed for ${DIR}/d1"
+    fi
+
+    rm -rf ${DIR}nonexistant
+    $LCMD pool_list ${DIR}nonexistant
+    [[ $? -ne 0 ]] || \
+        error "pool_list did not fail for invalid mountpoint ${DIR}nonexistant"
+
+    destroy_pool $POOL
+    destroy_pool $POOL2
+}
+
+test_5() {
+    # Issue commands from client
+    sub_test_5 $LCTL
+    sub_test_5 $LFS
+
+    # Issue commands from MDS
+    sub_test_5 "do_facet mds lctl"
+    sub_test_5 "do_facet mds lfs"
+
+}
+run_test 5 "lfs/lctl pool_list"
+
+test_6() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    local POOL_DIR=$POOL_ROOT/dir_tst
+    local POOL_FILE=$POOL_ROOT/file_tst
+
+    create_pool_nofail $POOL
+
+    do_facet mds lctl pool_list $FSNAME
+    [[ $? -eq 0 ]] || \
+        error "pool_list $FSNAME failed."
+
+    do_facet mds lctl pool_add $FSNAME.$POOL $TGT_ALL
+
+    mkdir -p $POOL_DIR
+    $SETSTRIPE -c -1 -p $POOL $POOL_DIR
+    [[ $? -eq 0 ]] || \
+        error "$SETSTRIPE -p $POOL failed."
+    check_dir_in_pool $POOL_DIR $POOL
+
+    # If an invalid pool name is specified, the command should fail
+    $SETSTRIPE -c 2 -p $INVALID_POOL $POOL_DIR
+    [[ $? -ne 0 ]] || \
+        error_ignore 19919 "setstripe to invalid pool did not fail."
+
+    # If the pool name does not exist, the command should fail
+    $SETSTRIPE -c 2 -p $NON_EXISTANT_POOL $POOL_DIR
+    [[ $? -ne 0 ]] || \
+        error_ignore 19919 "setstripe to non-existant pool did not fail."
+
+    # lfs setstripe should work as before if a pool name is not specified.
+    $SETSTRIPE -c -1 $POOL_DIR
+    [[ $? -eq 0 ]] || \
+        error "$SETSTRIPE -p $POOL_DIR failed."
+    $SETSTRIPE -c -1 $POOL_FILE
+    [[ $? -eq 0 ]] || \
+        error "$SETSTRIPE -p $POOL_FILE failed."
+
+    # lfs setstripe should fail if a start index that is outside the
+    # pool is specified.
+    create_pool_nofail $POOL2
+    add_pool $POOL2 "OST0000" "$FSNAME-OST0000_UUID "
+    $SETSTRIPE -o 1 -p $POOL2 $ROOT_POOL/$tfile
+    [[ $? -ne 0 ]] || \
+        error "$SETSTRIPE with start index outside the pool did not fail."
+
+    destroy_pool $POOL
+    destroy_pool $POOL2
+}
+run_test 6 "getstripe/setstripe"
+
+test_11() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+
+    [[ $OSTCOUNT -le 1 ]] && skip "Need atleast 2 OSTs" && return
+
+    create_pool_nofail $POOL
+    create_pool_nofail $POOL2
+
+    do_facet mds lctl pool_add $FSNAME.$POOL \
+        $FSNAME-OST[$TGT_FIRST-$TGT_MAX/2]
+    local start=$((TGT_FIRST+1))
+    do_facet mds lctl pool_add $FSNAME.$POOL2 \
+        $FSNAME-OST[$start-$TGT_MAX/2]
+
+    create_dir $POOL_ROOT/dir1  $POOL
+    create_dir $POOL_ROOT/dir2  $POOL2
+    check_dir_in_pool $POOL_ROOT/dir1 $POOL
+    check_dir_in_pool $POOL_ROOT/dir1 $POOL
+
+    local numfiles=100
+    createmany -o $POOL_ROOT/dir1/$tfile $numfiles || \
+        error "createmany $POOL_ROOT/dir1/$tfile failed!"
+
+    for file in $POOL_ROOT/dir1/*; do
+        check_file_in_pool $file $POOL
+    done
+
+    createmany -o $POOL_ROOT/dir2/$tfile $numfiles || \
+        error "createmany $POOL_ROOT/dir2/$tfile failed!"
+    for file in $POOL_ROOT/dir2/*; do
+        check_file_in_pool $file $POOL2
+    done
+
+    rm -rf $POOL_ROOT/dir?
+
+    destroy_pool $POOL
+    destroy_pool $POOL2
+
+    return 0
+}
+run_test 11 "OSTs in overlapping/multiple pools"
+
+test_12() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+
+    [[ $OSTCOUNT -le 2 ]] && skip "Need atleast 3 OSTs" && return
+
+    create_pool_nofail $POOL
+    create_pool_nofail $POOL2
+
+    do_facet mds lctl pool_add $FSNAME.$POOL \
+        $FSNAME-OST[$TGT_FIRST-$TGT_MAX/2]
+    local start=$((TGT_FIRST+1))
+    do_facet mds lctl pool_add $FSNAME.$POOL2 \
+        $FSNAME-OST[$start-$TGT_MAX/2]
+
+    echo creating some files in $POOL and $POOL2
+
+    create_dir $POOL_ROOT/dir1  $POOL
+    create_dir $POOL_ROOT/dir2  $POOL2
+    create_file $POOL_ROOT/file1 $POOL
+    create_file $POOL_ROOT/file2 $POOL2
+
+    echo Checking the files created
+    check_dir_in_pool $POOL_ROOT/dir1 $POOL
+    check_dir_in_pool $POOL_ROOT/dir2 $POOL2
+    check_file_in_pool $POOL_ROOT/file1 $POOL
+    check_file_in_pool $POOL_ROOT/file2 $POOL2
+
+    echo Changing the pool membership
+    do_facet mds lctl pool_remove $FSNAME.$POOL $FSNAME-OST[$TGT_FIRST]
+    do_facet mds lctl pool_list $FSNAME.$POOL
+    do_facet mds lctl pool_add $FSNAME.$POOL2 $FSNAME-OST[$TGT_FIRST]
+    do_facet mds lctl pool_list $FSNAME.$POOL2
+
+    echo Checking the files again    
+    check_dir_in_pool $POOL_ROOT/dir1 $POOL
+    check_dir_in_pool $POOL_ROOT/dir2 $POOL2
+    check_file_in_osts $POOL_ROOT/file1 "$TGT_LIST2"    
+    check_file_in_osts $POOL_ROOT/file2 "$(seq $start 2 $TGT_MAX)"
+
+    echo Creating some more files
+    create_dir $POOL_ROOT/dir3 $POOL
+    create_dir $POOL_ROOT/dir4 POOL2
+    create_file $POOL_ROOT/file3 $POOL
+    create_file $POOL_ROOT/file4 $POOL2
+
+    echo Checking the new files 
+    check_file_in_pool $POOL_ROOT/file3 $POOL
+    check_file_in_pool $POOL_ROOT/file4 $POOL2
+
+    destroy_pool $POOL
+    destroy_pool $POOL2
+
+    return 0    
+}
+run_test 12 "OST Pool Membership"
+
+test_13() {
+    [[ $OSTCOUNT -le 2 ]] && skip "Need atleast 3 OSTs" && return
+
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    local numfiles=10
+    local count=3
+
+    create_pool_nofail $POOL
+    do_facet mds lctl pool_add $FSNAME.$POOL $TGT_ALL
+
+    create_dir $POOL_ROOT/dir1 $POOL -1
+    createmany -o $POOL_ROOT/dir1/$tfile $numfiles || \
+        error "createmany $POOL_ROOT/dir1/$tfile failed!"
+    for file in $POOL_ROOT/dir1/*; do
+        check_file_in_pool $file $POOL $OSTCOUNT
+    done
+
+    create_file $POOL_ROOT/dir1/file1 $POOL 1 $TGT_FIRST
+    create_file $POOL_ROOT/dir1/file2 $POOL 1 $((TGT_FIRST+1))
+    create_file $POOL_ROOT/dir1/file3 $POOL 1 $((TGT_FIRST+2))
+    check_file_in_pool $POOL_ROOT/dir1/file1 $POOL 1
+    check_file_in_pool $POOL_ROOT/dir1/file2 $POOL 1
+    create_file $POOL_ROOT/dir1/file3 $POOL 1 $((TGT_FIRST+2))
+    check_file_in_osts $POOL_ROOT/dir1/file1 "$TGT_FIRST"
+    check_file_in_osts $POOL_ROOT/dir1/file2 "$((TGT_FIRST+1))"
+    check_file_in_osts $POOL_ROOT/dir1/file3 "$((TGT_FIRST+2))"
+
+    create_dir $POOL_ROOT/dir2 $POOL $count
+    createmany -o $POOL_ROOT/dir2/$tfile $numfiles || \
+        error "createmany $POOL_ROOT/dir2/$tfile failed!"
+    for file in $POOL_ROOT/dir2/*; do
+        check_file_in_pool $file $POOL $count
+    done
+
+    create_dir $POOL_ROOT/dir3 $POOL $count $((TGT_FIRST+1))
+    createmany -o $POOL_ROOT/dir3/$tfile_ $numfiles || \
+        error "createmany $POOL_ROOT/dir3/$tfile_ failed!"
+    for file in $POOL_ROOT/dir3/*; do
+        check_file_in_pool $file $POOL $count
+    done
+
+    create_dir $POOL_ROOT/dir4 $POOL 1
+    createmany -o $POOL_ROOT/dir4/$tfile_ $numfiles || \
+        error "createmany $POOL_ROOT/dir4/$tfile_ failed!"
+    for file in $POOL_ROOT/dir4/*; do
+        check_file_in_pool $file $POOL 1
+    done
+
+    create_dir $POOL_ROOT/dir5 $POOL 1 $((TGT_FIRST+2))
+    createmany -o $POOL_ROOT/dir5/$tfile_ $numfiles || \
+        error "createmany $POOL_ROOT/dir5/$tfile_ failed!"
+    for file in $POOL_ROOT/dir5/*; do
+        check_file_in_pool $file $POOL 1
+        check_file_in_osts  $file "$((TGT_FIRST+2))"
+    done
+
+    rm -rf create_dir $POOL_ROOT/dir?
+    destroy_pool $POOL
+
+    return 0
+}
+run_test 13 "Striping characteristics in a pool"
+
+test_14() {
+    [[ $OSTCOUNT -le 2 ]] && skip "Need atleast 3 OSTs" && return
+
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    local numfiles=100
+    local i
+
+    # Create a new filesystem that is guaranteed to be balanced.
+    formatall
+    setupall
+
+    create_pool_nofail $POOL
+    create_pool_nofail $POOL2
+
+    add_pool $POOL $TGT_HALF "$TGT_UUID2"
+    add_pool $POOL2 "OST0000" "$FSNAME-OST0000_UUID "
+
+    create_dir $POOL_ROOT/dir1 $POOL 1
+    create_file $POOL_ROOT/dir1/file $POOL 1
+    local OST=$($GETSTRIPE $POOL_ROOT/dir1/file | grep 0x | cut -f2)    
+    i=0
+    while [[ $i -lt $numfiles ]];
+    do
+        OST=$((OST+2))
+        [[ $OST -gt $TGT_MAX ]] && OST=$TGT_FIRST
+
+        # echo "Iteration: $i OST: $OST"
+        create_file $POOL_ROOT/dir1/file${i} $POOL 1
+        check_file_in_osts $POOL_ROOT/dir1/file${i} $OST
+        i=$((i+1))
+    done
+
+    # Fill OST $TGT_FIRST with 10M files
+    create_dir $POOL_ROOT/dir2 $POOL2 1
+    RC=0
+    i=0
+    while [[ $RC -eq 0 ]];
+    do
+      dd if=/dev/zero of=$POOL_ROOT/dir2/f${i} bs=1k count=$((1024*10))
+      RC=$?
+      i=$((i+1))
+    done
+
+    # Leave some space on the OST
+    rm -f $POOL_ROOT/dir2/f0
+    df -h /mnt/ost?
+
+    # OST $TGT_FIRST is no longer favored; but it may still be used.
+    create_dir $POOL_ROOT/dir3 $POOL 1
+    create_file $POOL_ROOT/dir3/file $POOL 1
+    createmany -o $POOL_ROOT/dir3/$tfile_ $numfiles || \
+        error "createmany $POOL_ROOT/dir3/$tfile_ failed!"
+    for file in $POOL_ROOT/dir3/*; do
+        check_file_in_pool $file $POOL
+    done
+
+    rm -rf $POOL_ROOT
+    destroy_pool $POOL
+    destroy_pool $POOL2
+    return 0
+}
+run_test 14 "Round robin and QOS striping within a pool"
+
+test_15() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    local numfiles=100
+    local i=0
+
+    while [[ $i -lt $OSTCOUNT ]]
+    do
+      create_pool_nofail pool${i}
+
+      local tgt=$(printf "$FSNAME-OST%04x_UUID " $i)
+      add_pool pool${i} "$FSNAME-OST[$i]" "$tgt"
+      create_dir $POOL_ROOT/dir${i} pool${i}
+      createmany -o $POOL_ROOT/dir$i/$tfile $numfiles || \
+          error "createmany $POOL_ROOT/dir$i/$tfile failed!"
+
+      for file in $POOL_ROOT/dir$i/*; do
+          check_file_in_osts $file $i
+      done
+
+      i=$((i+1))
+    done
+
+    i=0
+    while [[ $i -lt $OSTCOUNT ]]
+    do
+      destroy_pool pool${i}
+      i=$((i+1))
+    done
+
+    return 0
+}
+run_test 15 "One directory per OST/pool"
+
+test_16() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    local numfiles=10
+    local i=0
+
+    create_pool_nofail $POOL
+
+    add_pool $POOL $TGT_HALF "$TGT_UUID2"
+
+    local dir=$POOL_ROOT/$tdir
+    create_dir $dir $POOL
+
+    for i in $(seq 1 10); do
+        dir=${dir}/dir${i}
+    done
+    mkdir -p $dir
+
+    createmany -o $dir/$tfile $numfiles || \
+          error "createmany $dir/$tfile failed!"
+
+    for file in $dir/*; do
+        check_file_in_pool $file $POOL
+    done
+
+    rm -rf $POOL_ROOT/$tdir
+
+    destroy_pool $POOL
+
+    return 0
+}
+run_test 16 "Inheritance of pool properties"
+
+test_17() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    local numfiles=10
+    local i=0
+
+    create_pool_nofail $POOL
+
+    add_pool $POOL $TGT_ALL "$TGT_UUID"
+
+    local dir=$POOL_ROOT/dir
+    create_dir $dir $POOL
+
+    createmany -o $dir/${tfile}1_ $numfiles || \
+          error "createmany $dir/${tfile}1_ failed!"
+
+    for file in $dir/*; do
+        check_file_in_pool $file $POOL
+    done
+
+    destroy_pool $POOL
+
+    createmany -o $dir/${tfile}2_ $numfiles || \
+          error "createmany $dir/${tfile}2_ failed!"
+
+    rm -rf $dir
+    return 0
+}
+run_test 17 "Referencing an empty pool"
+
+create_perf_one() {
+    local dir=$1/d
+    local numfiles=$2
+    local time
+
+    mkdir -p $dir
+    sync; sleep 5 # give pending IO a chance to go to disk
+    stat=$(createmany -o $dir/${tfile} $numfiles)
+    rm -rf $dir
+    sync
+    time=$(echo $stat | cut -f 5 -d ' ')
+    echo $stat > /dev/stderr
+    echo $time
+}
+
+create_perf() {
+    local t1=$(create_perf_one $1 $2)
+    local t2=$(create_perf_one $1 $2)
+    local t3=$(create_perf_one $1 $2)
+    local time=$(echo "scale=2; ( $t1 + $t2 + $t3 ) / 3" | bc)
+
+    echo "$time"
+}
+
+test_18() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    local numfiles=10000
+    local i=0
+    local time1
+    local time2
+    local time3
+    local dir=$POOL_ROOT/dir
+    local stat
+    local diff
+
+    time1=$(create_perf $dir $numfiles)
+
+    create_pool_nofail $POOL
+
+    add_pool $POOL $TGT_ALL "$TGT_UUID"
+
+    create_dir $dir $POOL
+    time2=$(create_perf $dir $numfiles)
+
+    destroy_pool $POOL
+
+    time3=$(create_perf $dir $numfiles)
+
+    echo Time taken for $numfiles creates without pools: $time1
+    echo Time taken for $numfiles creates with pools: $time2
+    echo Time taken for $numfiles creates without pools: $time3
+
+    deg=$(echo "scale=2; (($time2 - $time3) * 100 / $time3) > 5" | bc)
+    diff=$(echo "scale=2; ($time2 - $time3) * 100 / $time3" | bc)
+
+    if [[ "$deg" == "1" ]]; then
+        error "Performance degradation with pools is $diff %."
+    else
+        echo  "Performance degradation with pools is $diff %."
+    fi
+    return 0
+}
+run_test 18 "File create in a directory which references a deleted pool"
+
+
+test_19() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    local numfiles=12
+    local dir1=$POOL_ROOT/dir1
+    local dir2=$POOL_ROOT/dir2
+    local i=0
+
+    create_pool_nofail $POOL
+
+    add_pool $POOL $TGT_HALF "$TGT_UUID2"
+
+    create_dir $dir1 $POOL
+    createmany -o $dir1/${tfile} $numfiles || \
+          error "createmany $dir1/${tfile} failed!"
+    for file in $dir1/*; do
+        check_file_in_pool $file $POOL
+    done
+
+    mkdir -p $dir2
+    createmany -o $dir2/${tfile} $numfiles || \
+          error "createmany $dir2/${tfile} failed!"
+    for file in $dir2/*; do
+        check_file_not_in_pool $file $POOL
+    done
+
+    rm -rf $dir1 $dir2
+    destroy_pool $POOL
+
+    return 0
+}
+run_test 19 "Pools should not come into play when not specified"
+
+test_20() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    local numfiles=12
+    local dir1=$POOL_ROOT/dir1
+    local dir2=$dir1/dir2
+    local dir3=$dir1/dir3
+    local i=0
+    local TGT
+
+    create_pool_nofail $POOL
+    create_pool_nofail $POOL2
+
+    add_pool $POOL $TGT_HALF "$TGT_UUID2"
+
+    local start=$((TGT_FIRST+1))
+    TGT=$(for i in `seq $start 2 $TGT_MAX`; \
+        do printf "$FSNAME-OST%04x_UUID " $i; done)
+    add_pool $POOL2 "$FSNAME-OST[$start-$TGT_MAX/2]" "$TGT"
+
+    create_dir $dir1 $POOL
+    create_file $dir1/file1 $POOL2
+    create_dir $dir2 $POOL2
+    touch $dir2/file2
+    mkdir $dir3
+    $SETSTRIPE -c 1 $dir3 # No pool assignment
+    touch $dir3/file3
+    $SETSTRIPE -c 1 $dir2/file4 # No pool assignment
+
+    check_file_in_pool $dir1/file1 $POOL2
+    check_file_in_pool $dir2/file2 $POOL2
+
+    check_dir_not_in_pool $dir3 $POOL
+    check_dir_not_in_pool $dir3 $POOL2
+
+    check_file_not_in_pool $dir3/file3 $POOL
+    check_file_not_in_pool $dir3/file3 $POOL2
+
+    check_file_not_in_pool $dir2/file4 $POOL
+    check_file_not_in_pool $dir2/file4 $POOL2
+
+    rm -rf $dir1
+    destroy_pool $POOL
+    destroy_pool $POOL2
+
+    return 0
+}
+run_test 20 "Different pools in a directory hierarchy."
+
+test_21() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    [[ $OSTCOUNT -le 1 ]] && skip "Need atleast 2 OSTs" && return
+
+    local numfiles=12
+    local i=0
+    local dir=$POOL_ROOT/dir
+
+    create_pool_nofail $POOL
+
+    add_pool $POOL $TGT_HALF "$TGT_UUID2"
+
+    create_dir $dir $POOL $OSTCOUNT
+    create_file $dir/file1 $POOL $OSTCOUNT
+    $GETSTRIPE -v $dir/file1
+    check_file_in_pool $dir/file1 $POOL
+
+    rm -rf $dir
+    destroy_pool $POOL
+
+    return 0
+}
+run_test 21 "OST pool with fewer OSTs than stripe count"
+
+add_loop() {
+    local pool=$1
+    local step=$2
+
+    echo loop for $pool
+
+    for c in $(seq 1 10);
+    do
+        echo "Pool $pool, iteration $c"
+        create_pool_nofail $pool
+        local TGT=$(for i in `seq $TGT_FIRST $step $TGT_MAX`; \
+            do printf "$FSNAME-OST%04x_UUID " $i; done)
+        add_pool $pool "$FSNAME-OST[$TGT_FIRST-$TGT_MAX/$step]" "$TGT"
+        destroy_pool $pool
+        do_facet mds lctl pool_list $FSNAME
+    done
+    echo loop for $pool complete
+}
+
+test_22() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    [[ $OSTCOUNT -le 1 ]] && skip "Need atleast 2 OSTs" && return
+
+    local numfiles=100
+
+    add_loop $POOL 1 &
+    add_loop $POOL2 2 &
+    sleep 5
+    create_dir $POOL_ROOT $POOL
+    createmany -o $POOL_ROOT/${tfile} $numfiles || \
+          error "createmany $POOL_ROOT/${tfile} failed!"
+    wait
+
+    return 0
+}
+run_test 22 "Simultaneous manipulation of a pool"
+
+test_23() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    [[ $OSTCOUNT -le 1 ]] && skip "Need atleast 2 OSTs" && return
+
+    mkdir -p $POOL_ROOT
+    check_runas_id $TSTID $TSTID $RUNAS  || {
+        skip "User $RUNAS_ID does not exist - skipping"
+        return 0
+    }
+
+    local numfiles=12
+    local i=0
+    local TGT
+    local LIMIT=1024
+    local dir=$POOL_ROOT/dir
+    local file1="$dir/$tfile-quota1"
+    local file2="$dir/$tfile-quota2"
+
+    create_pool_nofail $POOL
+
+    local TGT=$(for i in `seq $TGT_FIRST 3 $TGT_MAX`; \
+        do printf "$FSNAME-OST%04x_UUID " $i; done)
+    add_pool $POOL "$FSNAME-OST[$TGT_FIRST-$TGT_MAX/3]" "$TGT"
+    create_dir $dir $POOL
+
+    $LFS quotaoff -ug $MOUNT
+    $LFS quotacheck -ug $MOUNT
+    $LFS setquota -u $TSTUSR -b $LIMIT -B $LIMIT $dir #-i 5 -I 5 $dir
+
+    $LFS setstripe $file1 -c 1 -p $POOL
+    chown $TSTUSR.$TSTUSR $file1
+    ls -l $file1
+    type runas
+
+    stat=$(LC_ALL=C $RUNAS dd if=/dev/zero of=$file1 bs=1024 count=$((LIMIT*2)) 2>&1)
+    RC=$?
+    echo $stat
+    [[ $RC -eq 0 ]] && error "dd did not fail with EDQUOT."
+    echo $stat | grep "Disk quota exceeded"
+    [[ $? -eq 1 ]] && error "dd did not fail with EDQUOT."
+
+    echo "second run"
+    $LFS quotaoff -ug $MOUNT
+    # $LFS setquota -u $TSTUSR -b $LIMIT -B $LIMIT $dir
+    chown $TSTUSR.$TSTUSR $dir
+    i=0
+    RC=0
+    while [ $RC -eq 0 ];
+    do
+      i=$((i+1))
+      stat=$(LOCALE=C $RUNAS2 dd if=/dev/zero of=${file2}$i bs=1024 \
+          count=$((LIMIT*LIMIT)) 2>&1)
+      RC=$?
+      if [ $RC -eq 1 ]; then
+          echo $stat
+          echo $stat | grep "Disk quota exceeded"
+          [[ $? -eq 0 ]] && error "dd failed with EDQUOT"
+
+          echo $stat | grep "No space left on device"
+          [[ $? -ne 0 ]] && error "dd did not fail with ENOSPC; " \
+              "failed with $stat"
+      fi
+    done
+
+    df -h
+
+    rm -rf $POOL_ROOT
+    destroy_pool $POOL
+
+    return 0
+}
+run_test 23 "OST pools and quota"
+
+test_24() {
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+    [[ $OSTCOUNT -le 1 ]] && skip "Need atleast 2 OSTs" && return
+
+    local numfiles=10
+    local i=0
+    local TGT
+    local dir
+    local res
+
+
+    create_pool_nofail $POOL
+
+    add_pool $POOL $TGT_ALL "$TGT_UUID"
+
+    create_dir $POOL_ROOT/dir1 $POOL $OSTCOUNT
+
+    mkdir $POOL_ROOT/dir2
+    $SETSTRIPE $POOL_ROOT/dir2 -p $POOL -s 65536 -i 0 -c 1 || \
+        error "$SETSTRIPE $POOL_ROOT/dir2 failed"
+
+    mkdir $POOL_ROOT/dir3
+    $SETSTRIPE $POOL_ROOT/dir3 -s 65536 -i 0 -c 1 || \
+        error "$SETSTRIPE $POOL_ROOT/dir3 failed"
+
+    mkdir $POOL_ROOT/dir4
+
+    for i in $(seq 1 4);
+    do
+      dir=${POOL_ROOT}/dir${i}
+      local pool
+      local pool1
+      local count
+      local count1
+      local index
+      local size
+      local size1
+
+      createmany -o $dir/${tfile} $numfiles || \
+          error "createmany $dir/${tfile} failed!"
+      res=$($GETSTRIPE -v $dir | grep "^stripe_count:")
+      if [ $? -ne 0 ]; then
+          res=$($GETSTRIPE -v $dir | grep "^(Default) ")
+          pool=$(cut -f 9 -d ' ' <<< $res)
+          index=$(cut -f 7 -d ' ' <<< $res)
+          size=$(cut -f 5 -d ' ' <<< $res)
+          count=$(cut -f 3 -d ' ' <<< $res)
+      else
+          pool=$(cut -f 8 -d ' ' <<< $res)
+          index=$(cut -f 6 -d ' ' <<< $res)
+          size=$(cut -f 4 -d ' ' <<< $res)
+          count=$(cut -f 2 -d ' ' <<< $res)
+      fi
+
+      for file in $dir/*; do
+          if [ "$pool" != "" ]; then
+              check_file_in_pool $file $pool
+          fi
+          pool1=$($GETSTRIPE -v $file | grep "^lmm_pool_name:" |\
+              tr -d '[:blank:]' | cut -f 2 -d ':')
+          count1=$($GETSTRIPE -v $file | grep "^lmm_stripe_count:" |\
+              tr -d '[:blank:]' | cut -f 2 -d ':')
+          size1=$($GETSTRIPE -v $file | grep "^lmm_stripe_size:" |\
+              tr -d '[:blank:]' | cut -f 2 -d ':')
+          [[ "$pool" != "$pool1" ]] && \
+              error "Pool name ($pool) not inherited in $file($pool1)"
+          [[ "$count" != "$count1" ]] && \
+              error "Stripe count ($count) not inherited in $file ($count1)"
+          [[ "$size" != "$size1" ]] && [[ "$size" != "0" ]] && \
+              error "Stripe size ($size) not inherited in $file ($size1)"
+      done 
+    done
+
+    rm -rf $POOL_ROOT
+    destroy_pool $POOL
+
+    return 0
+}
+run_test 24 "Independence of pool from other setstripe parameters"
+
+log "cleanup: ======================================================"
+cd $ORIG_PWD
+cleanup_tests
+check_and_cleanup_lustre
+echo '=========================== finished ==============================='
+[ -f "$POOLSLOG" ] && cat $POOLSLOG && grep -q FAIL $POOLSLOG && exit 1 || true
+echo "$0: completed"
diff --git a/lustre/tests/parallel-scale.sh b/lustre/tests/parallel-scale.sh
index da4318c..2d30d79 100644
--- a/lustre/tests/parallel-scale.sh
+++ b/lustre/tests/parallel-scale.sh
@@ -420,4 +420,4 @@ run_test write_disjoint "write_disjoint"
 
 equals_msg `basename $0`: test complete, cleaning up
 check_and_cleanup_lustre
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true
+[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true
diff --git a/lustre/tests/recovery-mds-scale.sh b/lustre/tests/recovery-mds-scale.sh
index fd8d32f..44801bc 100644
--- a/lustre/tests/recovery-mds-scale.sh
+++ b/lustre/tests/recovery-mds-scale.sh
@@ -15,8 +15,11 @@ init_test_env $@
 
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
-TESTSUITELOG=${TESTSUITELOG:-$TMP/recovery-mds-scale}
+TESTSUITELOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh)}
 DEBUGLOG=$TESTSUITELOG.debug
+
+cleanup_logs
+
 exec 2>$DEBUGLOG
 echo "--- env ---" >&2
 env >&2
@@ -28,7 +31,7 @@ set -x
 
 [ -n "$CLIENTS" ] || { skip "$0 Need two or more remote clients" && exit 0; }
 [ $CLIENTCOUNT -ge 3 ] || \
-    { skip "$0 Need two or more clients, have $CLIENTCOUNT" && exit 0; }
+    { skip "$0 Need two or more remote clients, have $CLIENTCOUNT" && exit 0; }
 
 END_RUN_FILE=${END_RUN_FILE:-$SHARED_DIRECTORY/end_run_file}
 LOAD_PID_FILE=${LOAD_PID_FILE:-$TMP/client-load.pid}
@@ -121,7 +124,7 @@ summary_and_cleanup () {
     local result=PASS
     [ $rc -eq 0 ] || result=FAIL
 
-    log "Duraion:                $DURATION
+    log "Duration:                $DURATION
 Server failover period: $SERVER_FAILOVER_PERIOD seconds
 Exited after:           $ELAPSED seconds
 Number of failovers before exit:
@@ -145,6 +148,15 @@ Status: $result: rc=$rc"
         sleep 5
         kill -9 $CLIENT_LOAD_PIDS || true
     fi
+    if [ $rc -ne 0 ]; then
+        # we are interested in only on failed clients and servers
+        local failedclients=$(cat $END_RUN_FILE | grep -v $0)
+        # FIXME: need ostfailover-s nodes also for FLAVOR=OST
+        local product=$(gather_logs $(comma_list $(osts_nodes) \
+                                 $mds_HOST $mdsfailover_HOST $failedclients))
+        echo logs files $product
+    fi
+
     [ $rc -eq 0 ] && zconf_mount $(hostname) $MOUNT
 
     exit $rc
@@ -207,6 +219,19 @@ while [ $ELAPSED -lt $DURATION -a ! -e $END_RUN_FILE ]; do
         exit 4
     fi
 
+    log "Wait $SERVERFACET recovery complete before doing next failover ...."
+    if [[ $NUM_FAILOVERS != 0 ]]; then
+        if ! wait_recovery_complete $SERVERFACET ; then
+            echo "$SERVERFACET recovery is not completed!"
+            exit 7
+        fi
+    fi
+
+    log "Checking clients are in FULL state before doing next failover"
+    if ! wait_clients_import_state $NODES_TO_USE $SERVERFACET FULL; then
+        echo "Clients import not FULL, please consider to increase SERVER_FAILOVER_PERIOD=$SERVER_FAILOVER_PERIOD !"
+        
+    fi
     log "Starting failover on $SERVERFACET"
 
     facet_failover "$SERVERFACET" || exit 1
diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/rpc.sh
similarity index 66%
copy from lustre/tests/llmountcleanup.sh
copy to lustre/tests/rpc.sh
index 076faa7..11c5181 100755
--- a/lustre/tests/llmountcleanup.sh
+++ b/lustre/tests/rpc.sh
@@ -2,9 +2,13 @@
 export PATH=`dirname $0`/../utils:$PATH
 NAME=${NAME:-local}
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
-cleanupall -f
+cmd=$1
+shift
+$cmd $@
+
+exit $?
diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh
index c370f01..1b0ad38 100644
--- a/lustre/tests/sanity-quota.sh
+++ b/lustre/tests/sanity-quota.sh
@@ -41,8 +41,6 @@ IUNIT_SZ=${IUNIT_SZ:-10}	# min inode quota unit
 MAX_DQ_TIME=604800
 MAX_IQ_TIME=604800
 
-unset ENABLE_QUOTA
-
 TRACE=${TRACE:-""}
 LUSTRE=${LUSTRE:-`dirname $0`/..}
 . $LUSTRE/tests/test-framework.sh
@@ -50,6 +48,8 @@ init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 DIRECTIO=${DIRECTIO:-$LUSTRE/tests/directio}
 
+unset ENABLE_QUOTA
+
 remote_mds_nodsh && skip "remote MDS with nodsh" && exit 0
 remote_ost_nodsh && skip "remote OST with nodsh" && exit 0
 
@@ -2026,6 +2026,8 @@ test_25_sub() {
         [ $MDS_QUOTA_USED2_NEW -ne $((MDS_QUOTA_USED2_OLD + 1)) ] && \
                 quota_error a $TSTUSR2 "$TSTUSR2 inode quota usage transfer from $TSTUSR to $TSTUSR2 failed: [$MDS_QUOTA_USED2_OLD|$MDS_QUOTA_USED2_NEW]"
 	OST0_QUOTA_USED2_NEW=`$LFS quota -o $OST0_UUID $1 $TSTUSR2 $DIR | awk '/^.*[[:digit:]+][[:space:]+]/ { print $1 }'`
+	# when chown, the quota on ost could be displayed out of quota temporarily. Delete the '*' in this situation. b=20433
+	OST0_QUOTA_USED2_NEW=${OST0_QUOTA_USED2_NEW%\*}
         OST0_QUOTA_USED2_DELTA=$((OST0_QUOTA_USED2_NEW - OST0_QUOTA_USED2_OLD))
         [ $OST0_QUOTA_USED2_DELTA -ne $OST0_QUOTA_USED_DELTA ] && \
                 quota_error a $TSTUSR2 "$TSTUSR2 block quota usage transfer from $TSTUSR to $TSTUSR2 failed: [$OST0_QUOTA_USED2_OLD|$OST0_QUOTA_USED2_NEW]"
@@ -2151,6 +2153,31 @@ test_28() {
 }
 run_test_with_stat 28 "test for consistency for qunit when setquota (18574) ==========="
 
+test_30()
+{
+        local output
+        local LIMIT=1024
+        local TESTFILE="$DIR/$tdir/$tfile"
+        local GRACE=10
+
+        mkdir -p $DIR/$tdir
+        chmod 0777 $DIR/$tdir
+
+        $LFS setquota -t -u --block-grace $GRACE --inode-grace $MAX_IQ_TIME $DIR
+        $LFS setquota -u $TSTUSR -b $LIMIT -B 0 -i 0 -I 0 $DIR
+        $RUNAS dd if=/dev/zero of=$TESTFILE bs=1024 count=$((LIMIT * 2)) || true
+        cancel_lru_locks osc
+        sleep 5
+        $LFS setquota -u $TSTUSR -B 0 $DIR
+        $SHOW_QUOTA_USER
+        output=`$SHOW_QUOTA_USER | grep $MOUNT | awk '{ print $5 }' | tr -d s`
+        [ "$output" -le "$((GRACE - 5))" ] || error "grace times were reset or unexpectedly high latency"
+        rm -f $TESTFILE
+        resetquota -u $TSTUSR
+        $LFS setquota -t -u --block-grace $MAX_DQ_TIME --inode-grace $MAX_IQ_TIME $DIR
+}
+run_test_with_stat 30 "hard limit updates should not reset grace times ================"
+
 # turn off quota
 test_99()
 {
diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh
index 5a7c2a4..c4af2b0 100644
--- a/lustre/tests/sanity.sh
+++ b/lustre/tests/sanity.sh
@@ -5758,11 +5758,23 @@ function roc_access() {
 }
 
 function roc_hit() {
-	local list=$(comma_list $(osts_nodes))
-	ACCNUM=`do_nodes $list $LCTL get_param -n obdfilter.*.stats | \
-		grep 'cache_hit' | awk '{print $2}' | \
-		awk '{sum=sum+$1} END{print sum}'`
-	echo $ACCNUM
+    local list=$(comma_list $(osts_nodes))
+
+    ACCNUM=$(do_nodes $list $LCTL get_param -n obdfilter.*.stats | \
+        awk '/'cache_hit'/ {sum+=$2} END {print sum}')
+    echo $ACCNUM
+}
+
+function set_cache() {
+    local on=1
+
+    if [ "$2" == "off" ]; then
+        on=0;
+    fi
+    local list=$(comma_list $(osts_nodes))
+    do_nodes $list lctl set_param obdfilter.*.${1}_cache_enable $on
+
+    cancel_lru_locks osc
 }
 
 test_151() {
@@ -5860,6 +5872,210 @@ test_154() {
 }
 run_test 154 "parallel read and truncate should not deadlock ==="
 
+test_155_load() {
+    local temp=$TMP/$tfile
+    local file=$DIR/$tfile
+    local list=$(comma_list $(osts_nodes))
+    local big=$(do_nodes $list grep "cache" /proc/cpuinfo | \
+        awk '{sum+=$4} END{print sum}')
+
+    log big is $big K
+
+    dd if=/dev/urandom of=$temp bs=6096 count=1 || \
+        error "dd of=$temp bs=6096 count=1 failed"
+    cp $temp $file
+    cancel_lru_locks osc
+    cmp $temp $file || error "$temp $file differ"
+
+    $TRUNCATE $temp 6000
+    $TRUNCATE $file 6000
+    cmp $temp $file || error "$temp $file differ (truncate1)"
+
+    echo "12345" >>$temp
+    echo "12345" >>$file
+    cmp $temp $file || error "$temp $file differ (append1)"
+
+    echo "12345" >>$temp
+    echo "12345" >>$file
+    cmp $temp $file || error "$temp $file differ (append2)"
+
+    dd if=/dev/urandom of=$temp bs=$((big*2)) count=1k || \
+        error "dd of=$temp bs=$((big*2)) count=1k failed"
+    cp $temp $file
+    ls -lh $temp $file
+    cancel_lru_locks osc
+    cmp $temp $file || error "$temp $file differ"
+
+    rm -f $temp
+    true
+}
+
+test_155a() {
+    set_cache read on
+    set_cache writethrough on
+    test_155_load
+}
+run_test 155a "Verification of correctness: read cache:on write_cache:on"
+
+test_155b() {
+    set_cache read on
+    set_cache writethrough off
+    test_155_load
+}
+run_test 155b "Verification of correctness: read cache:on write_cache:off"
+
+test_155c() {
+    set_cache read off
+    set_cache writethrough on
+    test_155_load
+}
+run_test 155c "Verification of correctness: read cache:off write_cache:on"
+
+test_155d() {
+    set_cache read off
+    set_cache writethrough off
+    test_155_load
+}
+run_test 155d "Verification of correctness: read cache:off write_cache:off "
+
+test_156() {
+    local CPAGES=3
+    local BEFORE
+    local AFTER
+    local file="$DIR/$tfile"
+
+    log "Turn on read and write cache"
+    set_cache read on
+    set_cache writethrough on
+
+    log "Write data and read it back."
+    log "Read should be satisfied from the cache."
+    dd if=/dev/urandom of=$file bs=4k count=$CPAGES || error "dd failed"
+    BEFORE=`roc_hit`
+    cancel_lru_locks osc
+    cat $file >/dev/null
+    AFTER=`roc_hit`
+    if ! let "AFTER - BEFORE == CPAGES"; then
+        error "NOT IN CACHE: before: $BEFORE, after: $AFTER"
+    else
+        log "cache hits:: before: $BEFORE, after: $AFTER"
+    fi
+
+    log "Read again; it should be satisfied from the cache."
+    BEFORE=$AFTER
+    cancel_lru_locks osc
+    cat $file >/dev/null
+    AFTER=`roc_hit`
+    if ! let "AFTER - BEFORE == CPAGES"; then
+        error "NOT IN CACHE: before: $BEFORE, after: $AFTER"
+    else
+        log "cache hits:: before: $BEFORE, after: $AFTER"
+    fi
+
+
+    log "Turn off the read cache and turn on the write cache"
+    set_cache read off
+    set_cache writethrough on
+
+    log "Read again; it should be satisfied from the cache."
+    BEFORE=`roc_hit`
+    cancel_lru_locks osc
+    cat $file >/dev/null
+    AFTER=`roc_hit`
+    if ! let "AFTER - BEFORE == CPAGES"; then
+        error "NOT IN CACHE: before: $BEFORE, after: $AFTER"
+    else
+        log "cache hits:: before: $BEFORE, after: $AFTER"
+    fi
+
+    log "Read again; it should not be satisfied from the cache."
+    BEFORE=$AFTER
+    cancel_lru_locks osc
+    cat $file >/dev/null
+    AFTER=`roc_hit`
+    if ! let "AFTER - BEFORE == 0"; then
+        error "IN CACHE: before: $BEFORE, after: $AFTER"
+    else
+        log "cache hits:: before: $BEFORE, after: $AFTER"
+    fi
+
+    log "Write data and read it back."
+    log "Read should be satisfied from the cache."
+    dd if=/dev/urandom of=$file bs=4k count=$CPAGES || error "dd failed"
+    BEFORE=`roc_hit`
+    cancel_lru_locks osc
+    cat $file >/dev/null
+    AFTER=`roc_hit`
+    if ! let "AFTER - BEFORE == CPAGES"; then
+        error "NOT IN CACHE: before: $BEFORE, after: $AFTER"
+    else
+        log "cache hits:: before: $BEFORE, after: $AFTER"
+    fi
+
+    log "Read again; it should not be satisfied from the cache."
+    BEFORE=$AFTER
+    cancel_lru_locks osc
+    cat $file >/dev/null
+    AFTER=`roc_hit`
+    if ! let "AFTER - BEFORE == 0"; then
+        error "IN CACHE: before: $BEFORE, after: $AFTER"
+    else
+        log "cache hits:: before: $BEFORE, after: $AFTER"
+    fi
+
+
+    log "Turn off read and write cache"
+    set_cache read off
+    set_cache writethrough off
+
+    log "Write data and read it back"
+    log "It should not be satisfied from the cache."
+    rm -f $file
+    dd if=/dev/urandom of=$file bs=4k count=$CPAGES || error "dd failed"
+    cancel_lru_locks osc
+    BEFORE=`roc_hit`
+    cat $file >/dev/null
+    AFTER=`roc_hit`
+    if ! let "AFTER - BEFORE == 0"; then
+        error_ignore 20762 "IN CACHE: before: $BEFORE, after: $AFTER"
+    else
+        log "cache hits:: before: $BEFORE, after: $AFTER"
+    fi
+
+
+    log "Turn on the read cache and turn off the write cache"
+    set_cache read on
+    set_cache writethrough off
+
+    log "Write data and read it back"
+    log "It should not be satisfied from the cache."
+    rm -f $file
+    dd if=/dev/urandom of=$file bs=4k count=$CPAGES || error "dd failed"
+    BEFORE=`roc_hit`
+    cancel_lru_locks osc
+    cat $file >/dev/null
+    AFTER=`roc_hit`
+    if ! let "AFTER - BEFORE == 0"; then
+        error_ignore 20762 "IN CACHE: before: $BEFORE, after: $AFTER"
+    else
+        log "cache hits:: before: $BEFORE, after: $AFTER"
+    fi
+
+    log "Read again; it should be satisfied from the cache."
+    BEFORE=`roc_hit`
+    cancel_lru_locks osc
+    cat $file >/dev/null
+    AFTER=`roc_hit`
+    if ! let "AFTER - BEFORE == CPAGES"; then
+        error "NOT IN CACHE: before: $BEFORE, after: $AFTER"
+    else
+        log "cache hits:: before: $BEFORE, after: $AFTER"
+    fi
+
+    rm -f $file
+}
+run_test 156 "Verification of ROC tunables ========================"
+
 test_170() {
         $LCTL clear	# bug 18514
         $LCTL debug_daemon start $TMP/${tfile}_log_good
diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh
index 360cd0a..1486650 100644
--- a/lustre/tests/test-framework.sh
+++ b/lustre/tests/test-framework.sh
@@ -1317,6 +1317,8 @@ stopall() {
 }
 
 cleanupall() {
+    nfs_client_mode && return
+
     stopall $*
     unload_modules
 }
@@ -1371,6 +1373,8 @@ writeconf_all () {
 }
 
 setupall() {
+    nfs_client_mode && return
+
     sanity_mount_check ||
         error "environments are insane!"
 
@@ -1476,7 +1480,24 @@ init_param_vars () {
     fi
 }
 
+nfs_client_mode () {
+    if [ "$NFSCLIENT" ]; then
+        echo "NFSCLIENT mode: setup, cleanup, check config skipped"
+        local clients=$CLIENTS
+        [ -z $clients ] && clients=$(hostname)
+
+        # FIXME: remove hostname when 19215 fixed
+        do_nodes $clients "echo \\\$(hostname); grep ' '$MOUNT' ' /proc/mounts"
+        declare -a nfsexport=(`grep ' '$MOUNT' ' /proc/mounts | awk '{print $1}' | awk -F: '{print $1 " "  $2}'`)
+        do_nodes ${nfsexport[0]} "echo \\\$(hostname); df -T  ${nfsexport[1]}"
+        return
+    fi
+    return 1
+}
+
 check_config () {
+    nfs_client_mode && return
+
     local mntpt=$1
     local myMGS_host=$mgs_HOST
     if [ "$NETTYPE" = "ptl" ]; then
@@ -1506,6 +1527,8 @@ check_timeout () {
 }
 
 check_and_setup_lustre() {
+    nfs_client_mode && return
+
     local MOUNTED=$(mounted_lustre_filesystems)
     if [ -z "$MOUNTED" ] || ! $(echo $MOUNTED | grep -w -q $MOUNT); then
         [ "$REFORMAT" ] && formatall
@@ -1884,7 +1907,11 @@ _basetest() {
 }
 
 basetest() {
-    IFS=abcdefghijklmnopqrstuvwxyz _basetest $1
+    if [[ $1 = [a-z]* ]]; then
+        echo $1
+    else
+        echo ${1%%[a-z]*}
+    fi
 }
 
 # print a newline if the last test was skipped
@@ -2478,16 +2505,21 @@ get_mds_mdt_device_proc_path() {
 }
 
 ########################
-convert_facet2name() {
-    case "$1" in
-        "ost" ) echo "OST0000" ;;
-        "ost1") echo "OST0000" ;;
-        "ost2") echo "OST0001" ;;
-        "ost3") echo "OST0002" ;;
-        "ost4") echo "OST0003" ;;
-        "ost5") echo "OST0004" ;;
-        *) error "unknown facet!" ;;
-    esac
+
+convert_facet2label() { 
+    local facet=$1
+
+    if [ x$facet = xost ]; then
+       facet=ost1
+    fi
+
+    local varsvc=${facet}_svc
+
+    if [ -n ${!varsvc} ]; then
+        echo ${!varsvc}
+    else  
+        error "No lablel for $facet!"
+    fi
 }
 
 get_clientosc_proc_path() {
@@ -2497,30 +2529,57 @@ get_clientosc_proc_path() {
 }
 
 get_osc_import_name() {
-    local node=$1
+    local facet=$1
     local ost=$2
-    local name=$(convert_facet2name $ost)
+    local label=$(convert_facet2label $ost)
 
-    if [ "$node" == "mds" ]; then
-        get_mdtosc_proc_path $name
+    if [ "$facet" == "mds" ]; then
+        get_mdtosc_proc_path $label
         return 0
     fi
 
-    get_clientosc_proc_path $name
+    get_clientosc_proc_path $label
+    return 0
+}
+
+wait_import_state () {
+    local expected=$1
+    local CONN_PROC=$2
+    local CONN_STATE
+    local i=0
+
+    CONN_STATE=$($LCTL get_param -n $CONN_PROC 2>/dev/null | cut -f2)
+    while [ "${CONN_STATE}" != "${expected}" ]; do
+        if [ "${expected}" == "DISCONN" ]; then
+            # for disconn we can check after proc entry is removed
+            [ "x${CONN_STATE}" == "x" ] && return 0
+            #  with AT we can have connect request timeout ~ reconnect timeout
+            # and test can't see real disconnect
+            [ "${CONN_STATE}" == "CONNECTING" ] && return 0
+        fi
+        # disconnect rpc should be wait not more obd_timeout
+        [ $i -ge $(($TIMEOUT * 3 / 2)) ] && \
+            error "can't put import for $CONN_PROC into ${expected} state" && return 1
+        sleep 1
+        CONN_STATE=$($LCTL get_param -n $CONN_PROC 2>/dev/null | cut -f2)
+        i=$(($i + 1))
+    done
+
+    log "$CONN_PROC now in ${CONN_STATE} state"
     return 0
 }
 
 wait_osc_import_state() {
-    local node=$1
+    local facet=$1
     local ost_facet=$2
     local expected=$3
-    local ost=$(get_osc_import_name $node $ost_facet)
+    local ost=$(get_osc_import_name $facet $ost_facet)
     local CONN_PROC
     local CONN_STATE
     local i=0
 
-    CONN_PROC="osc.${FSNAME}-${ost}.ost_server_uuid"
-    CONN_STATE=$(do_facet $node lctl get_param -n $CONN_PROC | cut -f2)
+    CONN_PROC="osc.${ost}.ost_server_uuid"
+    CONN_STATE=$(do_facet $facet lctl get_param -n $CONN_PROC 2>/dev/null | cut -f2)
     while [ "${CONN_STATE}" != "${expected}" ]; do
         if [ "${expected}" == "DISCONN" ]; then 
             # for disconn we can check after proc entry is removed
@@ -2533,10 +2592,84 @@ wait_osc_import_state() {
         [ $i -ge $(($TIMEOUT * 3 / 2)) ] && \
             error "can't put import for ${ost}(${ost_facet}) into ${expected} state" && return 1
         sleep 1
-        CONN_STATE=$(do_facet $node lctl get_param -n $CONN_PROC | cut -f2)
+        CONN_STATE=$(do_facet $facet lctl get_param -n $CONN_PROC | cut -f2)
         i=$(($i + 1))
     done
 
     log "${ost_facet} now in ${CONN_STATE} state"
     return 0
 }
+
+get_clientmdc_proc_path() {
+    echo "${1}-mdc-*"
+}
+
+do_rpc_nodes () {
+    local list=$1
+    shift
+
+    do_nodes $list "PATH=$LUSTRE/tests/:$PATH sh rpc.sh $@ " 
+}
+
+wait_clients_import_state () {
+    local list=$1
+    local facet=$2
+    local expected=$3
+    shift
+
+    local label=$(convert_facet2label $facet)
+    local proc_path
+    case $facet in
+        ost* ) proc_path="osc.$(get_clientosc_proc_path $label).ost_server_uuid" ;;
+        mds* ) proc_path="mdc.$(get_clientmdc_proc_path $label).mds_server_uuid" ;;
+        *) error "unknown facet!" ;;
+    esac
+
+
+    if ! do_rpc_nodes $list wait_import_state $expected $proc_path; then
+        error "import is not in ${expected} state"
+        return 1
+    fi
+}
+
+gather_logs () {
+    local list=$1
+
+    local ts=$(date +%s)
+
+    # bug 20237, comment 11
+    # It would also be useful to provide the option
+    # of writing the file to an NFS directory so it doesn't need to be copied.
+    local tmp=$TMP
+    local docp=true
+    [ -d "$SHARED_DIR_LOGS" ] && tmp=$SHARED_DIR_LOGS && docp=false
+
+    # dump lustre logs, dmesg
+    do_nodes $list "log=$tmp/\\\$(hostname)-debug-$ts.log ;
+lctl dk \\\$log >/dev/null;
+log=$tmp/\\\$(hostname)-dmesg-$ts.log;
+dmesg > \\\$log; "
+
+    # FIXME: does it make sense to collect the logs for $ts only, but all
+    # TESTSUITE logs?
+    # rsync $TMP/*${TESTSUITE}* to gather the logs dumped by error fn
+    local logs=$TMP/'*'${TESTSUITE}'*'
+    if $docp; then
+        logs=$logs' '$tmp/'*'$ts'*'
+    fi
+    for node in ${list//,/ }; do
+        rsync -az $node:"$logs" $TMP 
+    done
+
+    local archive=$TMP/${TESTSUITE}-$ts.tar.bz2
+    tar -jcf $archive $tmp/*$ts* $TMP/*${TESTSUITE}*
+
+    echo $archive
+}
+
+cleanup_logs () {
+    local list=${1:-$(comma_list $(nodes_list))}
+
+    [ -n ${TESTSUITE} ] && do_nodes $list "rm -f $TMP/*${TESTSUITE}*" || true
+}
+
diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c
index e288707..d2bf7f3 100644
--- a/lustre/utils/lfs.c
+++ b/lustre/utils/lfs.c
@@ -1886,6 +1886,17 @@ int lfs_setquota(int argc, char **argv)
                         dqb->dqb_ihardlimit = tmp_qctl.qc_dqblk.dqb_ihardlimit;
                 if (!(limit_mask & ISLIMIT))
                         dqb->dqb_isoftlimit = tmp_qctl.qc_dqblk.dqb_isoftlimit;
+
+                /* Keep grace times if we have got no softlimit arguments */
+                if ((limit_mask & BHLIMIT) && !(limit_mask & BSLIMIT)) {
+                        dqb->dqb_valid |= QIF_BTIME;
+                        dqb->dqb_btime = tmp_qctl.qc_dqblk.dqb_btime;
+                }
+
+                if ((limit_mask & IHLIMIT) && !(limit_mask & ISLIMIT)) {
+                        dqb->dqb_valid |= QIF_ITIME;
+                        dqb->dqb_itime = tmp_qctl.qc_dqblk.dqb_itime;
+                }
         }
 
         dqb->dqb_valid |= (limit_mask & (BHLIMIT | BSLIMIT)) ? QIF_BLIMITS : 0;
diff --git a/snmp/lustre-snmp-trap.c b/snmp/lustre-snmp-trap.c
index 9b6073d..910e9de 100644
--- a/snmp/lustre-snmp-trap.c
+++ b/snmp/lustre-snmp-trap.c
@@ -59,6 +59,7 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <stdarg.h>
+#include <ctype.h>
 #include "lustre-snmp-util.h"
 
 /**************************************************************************
@@ -364,7 +365,7 @@ void send_portals_catastrophe_trap(char *reason_string)
 
     /*And the data is a octet string, that contains the actually reason string*/
     var_trap[1].type = ASN_OCTET_STR;
-    var_trap[1].val.string = reason_string;
+    var_trap[1].val.string = (unsigned char *)reason_string;
     var_trap[1].val_len = strlen(reason_string);
 
     /*And now send off the trap*/
@@ -419,7 +420,7 @@ void send_obd_unhealthy_trap(char *obd_name,char *reason_string)
 
     /*And the data is a octet string, that contains the actually reason strong*/
     var_trap[1].type = ASN_OCTET_STR;
-    var_trap[1].val.string = obd_name;
+    var_trap[1].val.string = (unsigned char *)obd_name;
     var_trap[1].val_len = strlen(obd_name);
 
     /* 
@@ -434,7 +435,7 @@ void send_obd_unhealthy_trap(char *obd_name,char *reason_string)
 
     /*And the data is a octet string, that contains the actually reason strong*/
     var_trap[2].type = ASN_OCTET_STR;
-    var_trap[2].val.string = reason_string;
+    var_trap[2].val.string = (unsigned char *)reason_string;
     var_trap[2].val_len = strlen(reason_string);
 
     /*And now send off the trap*/
diff --git a/snmp/lustre-snmp-util.c b/snmp/lustre-snmp-util.c
index 61fbd2e..56d4344 100644
--- a/snmp/lustre-snmp-util.c
+++ b/snmp/lustre-snmp-util.c
@@ -296,8 +296,6 @@ void lustrefs_ctrl(int command)
 
 int get_sysstatus(void)
 {
-    FILE    *fptr = NULL;
-    int     len = 0;
     int     ret_val = ERROR ;
     char    sys_status[50] = {0};
     
@@ -542,9 +540,9 @@ unsigned char*
         size_t  *var_len)
 {
     static unsigned char string[SPRINT_MAX_LEN];
-    if( SUCCESS != read_string(file_path, string,sizeof(string)))
+    if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
         return NULL;
-    *var_len = strlen(string);
+    *var_len = strlen((char *)string);
     return (unsigned char *) string;
 }
 
diff --git a/snmp/lustre-snmp-util.h b/snmp/lustre-snmp-util.h
index b1ee87c..b2c85eb 100644
--- a/snmp/lustre-snmp-util.h
+++ b/snmp/lustre-snmp-util.h
@@ -220,4 +220,11 @@ unsigned char *
 int stats_values(char * filepath,char * name_value, unsigned long long * nb_sample, unsigned long long * min, unsigned long long * max, unsigned long long * sum, unsigned long long * sum_square);
 extern int mds_stats_values(char * name_value, unsigned long long * nb_sample, unsigned long long * min, unsigned long long * max, unsigned long long * sum, unsigned long long * sum_square);
 
+ /* export for net-snmp util-funcs */
+int             header_simple_table(struct variable *, oid *, size_t *,
+                                    int, size_t *,
+                                    WriteMethod ** write_method, int);
+int             header_generic(struct variable *, oid *, size_t *, int,
+                               size_t *, WriteMethod **);
+
 #endif /* LUSTRE_SNMP_UTIL_H */
diff --git a/snmp/lustre-snmp.c b/snmp/lustre-snmp.c
index 1a3039a..5dc19b4 100644
--- a/snmp/lustre-snmp.c
+++ b/snmp/lustre-snmp.c
@@ -238,23 +238,23 @@ var_clusterFileSystems(struct variable *vp,
 
     case SYSVERSION:
         sprintf(file_path, "%s%s", LUSTRE_PATH,"version");
-        if( SUCCESS != read_string(file_path, string,sizeof(string)))
+        if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
             return NULL;
-        *var_len = strlen(string);
+        *var_len = strlen((char *)string);
         return (unsigned char *) string;
 
     case SYSKERNELVERSION:
         sprintf(file_path, "%s%s", LUSTRE_PATH,"kernel_version");
-        if( SUCCESS != read_string(file_path, string,sizeof(string)))
+        if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
             return NULL;
-        *var_len = strlen(string);
+        *var_len = strlen((char *)string);
         return (unsigned char *) string;
 
     case SYSHEALTHCHECK:
         sprintf(file_path, "%s%s", LUSTRE_PATH,FILENAME_SYSHEALTHCHECK);
-        if( SUCCESS != read_string(file_path, string,sizeof(string)))
+        if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
             return NULL;
-        *var_len = strlen(string);
+        *var_len = strlen((char*)string);
         return (unsigned char *) string;
 
     case SYSSTATUS:
@@ -574,7 +574,7 @@ write_sysStatus(int      action,
 {
   static long *long_ret;
   int size;
-  int pid, new_value;
+  int new_value;
 
 
 
diff --git a/snmp/lustre-snmp.h b/snmp/lustre-snmp.h
index 2f4e8e9..3c0c5fb 100644
--- a/snmp/lustre-snmp.h
+++ b/snmp/lustre-snmp.h
@@ -42,6 +42,7 @@
 #define LUSTRE_SNMP_H
 
 #include "lustre-snmp-util.h"
+#include "lustre-snmp-trap.h"
 
 config_require(util_funcs)
 config_add_mib(LUSTRE-MIB)
diff --git a/tree_status b/tree_status
index a438433..78108e9 100644
--- a/tree_status
+++ b/tree_status
@@ -1,2 +1,2 @@
 PRISTINE = 1
-MTIME = 1248495737
+MTIME = 1255096276

-- 
Lustre Debian Packaging 



More information about the Pkg-lustre-svn-commit mailing list