diff --git a/Makefile.in b/Makefile.in
index b677cf2..742480a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -549,7 +549,7 @@ tbutc: cmd comerr bubasics butm budb bucoord cmd butc libadmin
 budb: cmd comerr bubasics uss
 	+${COMPILE_PART1} budb ${COMPILE_PART2}
 
-tbudb: budb tubik
+tbudb: budb tubik libafsauthent
 	+[ yes != "$(ENABLE_PTHREADED_UBIK)" ] || case ${SYS_NAME} in \
 	alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
 		${COMPILE_PART1} tbudb ${COMPILE_PART2} ;; \
diff --git a/NEWS b/NEWS
index 2c2ce35..e1f5d9b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,110 @@
                        User-Visible OpenAFS Changes
 
-OpenAFS 1.6.2 (in progress)
+OpenAFS 1.6.4
+
+All platforms
+
+    * Obey the jumbo/nojumbo settings for ubik servers (the DB servers)
+      too. In previous releases, those servers may have used jumbograms
+      even if they were not configured to do so. This change corrects
+      the actual behaviour, and will improve performance and reliability
+      for sites where jumbograms are problematic. It could cause a decrease
+      in performance for sites where jumbograms work, but those can turn
+      them back on manually.
+
+    * Dozens of fixes for common coding problems like use after free,
+      use of possibly uninitialised memory, reading or writing past the
+      end of arrays and potential NULL pointer derefences. Spotted by
+      code analysis tools or human inspection.
+
+    * Documentation improvements.
+
+    * Fixes and improvements to the diagnostic or log messages printed by
+      vos, the fileserver and others.
+
+    * Build fixes, making parallel builds more reliable with certain
+      configuration options and helping various platforms including
+      recent releases of IRIX, Solaris and several flavours of Linux.
+
+    * Avoid sending a small amount of data over the wire unencrypted
+      under certain conditions, and emit the correct error message in
+      this case.
+
+All server platforms
+
+    * Avoid generating duplicate IDs for readonly and backup volumes,
+      which could happen under certain conditions.
+
+    * Allow the fileserver to return volume data like quota or free space,
+      which is available publicly elsewhere, without the additional access
+      check for read permissions on a volume's root directory the fileserver
+      performed before.
+
+    * The fileserver now emits a log message when it ran out of memory for
+      callbacks.
+
+    * Avoid several potential fileserver problems, including memory
+      corruption and segmentation faults, due to client bookkeeping.
+
+    * Avoid known cases of silent data corruption due to background syncs
+      on the fileserver, especially during Copy on Write.
+
+    * Make the fileserver sync behaviour runtime configurable. Up to 1.4.5,
+      we had synchronous syncs which were safe but really slow. Since 1.4.5,
+      we've had asynchronous syncs which are much faster but believed to
+      be the cause of rare data corruption issues, and while all known cases
+      of these happening are believed to be fixed in the 1.6.3 release, doubts
+      remain. This change allows choosing between those, and in addition allows
+      to turn syncs by the fileserver off altogether, thus relying on the vice
+      partition's backend filesystem and the operating system, or to just
+      execute them when a volume is detached. The default behaviour is
+      unchanged from releases since 1.4.5, but it's highly recommended to
+      consider the additional options this change provides. Future OpenAFS
+      releases will default to "-sync=none".
+
+    * For dbservers, avoid a situation where misinterpreting transient
+      network errors causes long-term issues with achieving ubik quorum.
+
+All UNIX client platforms
+
+    * Improvements to the detection of an aklog-specific krb5 configuration
+      file, for the purposes of turning on "weak crypto" for aklog.
+
+    * Fixed a regression introduced in release 1.6.2 which caused the
+      supposedly persistent disk cache to be discarded upon client start.
+      (RT #131655)
+
+Linux clients
+
+    * Support Linux kernels up to 3.10
+
+    * Fixed two bugs making it impossible to unmount a disk cache filesystem
+      after it has been used by the client. (RT #131613)
+
+    * Fixed a bug that could cause an oops with kernels 3.6 and later
+
+OpenBSD
+
+    * Improved support for OpenBSD 4.9 to 5.3
+
+OpenAFS 1.6.3
+
+  This release number had to be skipped for technical reasons.
+
+OpenAFS 1.6.2.1
+
+  Linux clients
+
+    * Support Linux kernels up to 3.8.
+
+    * Make the init script cope with the output of ifconfig on recent Fedora.
+
+OpenAFS 1.6.2
 
   All platforms
 
+    * Fix buffer overflows in fileserver and ptserver.
+
     * Abort an rx connection when given an unknown service (Gerrit 7593).
 
     * "idle dead" behavior improvements.
diff --git a/README b/README
index 0b537e8..9ea0509 100644
--- a/README
+++ b/README
@@ -27,7 +27,7 @@ A  Configuring
    source in, you will only have an src/ directory.
 
    1. Pick a system to build for, and note its default AFS sys_name.
-      A directory will be automatically created for binaries to be written 
+      A directory will be automatically created for binaries to be written
       into with this name when you build.
 
       alpha_dux40, alpha_dux50, alpha_dux51 (client does not work)
@@ -145,18 +145,18 @@ A  Configuring
 
 B  Building
 
-   1. Now, you can build OpenAFS. 
+   1. Now, you can build OpenAFS.
 
       % make
 
-   2. Install your build using either "make install" to install 
+   2. Install your build using either "make install" to install
       into the current system (you will need to be root, and files
       will be placed as appropriate for Transarc or standard paths),
-      "make install DESTDIR=/some/path" to install into an alternate 
+      "make install DESTDIR=/some/path" to install into an alternate
       directory tree, or if you configured with --enable-transarc-paths
-      make dest to create a complete binary tree in the dest directory      
+      make dest to create a complete binary tree in the dest directory
       under the directory named for the sys_name you built for,
-      e.g. sun4x_57/dest or i386_linux22/dest 
+      e.g. sun4x_57/dest or i386_linux22/dest
 
    3. As appropriate you can clean up or, if you're using Linux, build for
       another kernel version.
@@ -168,7 +168,7 @@ B  Building
 C  Problems
 
    If you have a problem building this source, you may want to visit
-   http://www.openafs.org/ to see if any problems have been reported 
+   http://www.openafs.org/ to see if any problems have been reported
    or to find out how to get more help.
 
    Mailing lists have been set up to help; More details can be found
@@ -200,7 +200,7 @@ D  Linux Notes
 
       % ./configure --with-afs-sysname=<sysname> \
           --with-linux-kernel-headers=/usr/src/linux-2.2.19-i686
-      % make 
+      % make
 
    Your build tree will now include an additional kernel module for your
    additional kernel headers. Be aware that if the kernel version string
@@ -246,9 +246,9 @@ G  FreeBSD Notes
 
    You also need access to your kernel build directory for the opt_global.h
    include file.  Use the --with-bsd-kernel-build= configure option if your
-   kernel build is not GENERIC in the standard place. If 
-   /usr/src/sys/${CPUARCH}/compile/GENERIC does not point to 
-   /usr/obj/usr/src/sys/GENERIC you may need to resolve that and retry the 
+   kernel build is not GENERIC in the standard place. If
+   /usr/src/sys/${CPUARCH}/compile/GENERIC does not point to
+   /usr/obj/usr/src/sys/GENERIC you may need to resolve that and retry the
    build.
 
    There is no server package, but I am told that "make install" will put
diff --git a/README-WINDOWS b/README-WINDOWS
index 1f18664..8237d45 100644
--- a/README-WINDOWS
+++ b/README-WINDOWS
@@ -2,10 +2,10 @@ This software has been released under the terms of the IBM Public
 License.  For details, see the LICENSE file in the top-level source
 directory or on-line at http://www.openafs.org/dl/license10.html
 
-The document now provides a step by step procedure that takes the user 
-from a basic Windows 2000/XP/2003/Vista/2008 workstation to an OpenAFS 
-development environment.   Details are provided so that a 'beginning' 
-windows developer can build an OpenAFS installable package for Windows 
+The document now provides a step by step procedure that takes the user
+from a basic Windows 2000/XP/2003/Vista/2008 workstation to an OpenAFS
+development environment.   Details are provided so that a 'beginning'
+windows developer can build an OpenAFS installable package for Windows
 2000/XP/2003/Vista/2008.
 
 NOTE 1:
@@ -25,7 +25,7 @@ one of:
  * Windows 2000
  * Windows XP
  * Windows XP SP2
- * Windows 2003 
+ * Windows 2003
  * Windows 2003 SP1
  * Windows XP 64
  * Windows 2003 64
@@ -35,7 +35,7 @@ one of:
  * Windows 7 (32 or 64)
  * Windows 2008 R2 (32 or 64)
 
-The build process is controlled by a nmake file that generates the 
+The build process is controlled by a nmake file that generates the
 necessary binaries and binds them into an install package.
 
 The following steps describe how to configure the development environment:
@@ -52,9 +52,9 @@ The following steps describe how to configure the development environment:
    J. Build Wix MSI Install Package
    K. Final Results
    L. Optional Items
-   	
+
 The Microsoft development tools require anywhere from 660 MB to 1.8GB
-of storage depending on which compilers are selected.  The following 
+of storage depending on which compilers are selected.  The following
 versions are supported:
 
     Microsoft Visual Studio .NET 
@@ -85,7 +85,7 @@ One of the following Microsoft DDK/WDK is required:
     Microsoft Windows Driver Kit 6.0
     Microsoft Windows Driver Kit 6.1
 
-NOTE: Not all combinations of Visual Studio, SDK, and DDK/WDK are 
+NOTE: Not all combinations of Visual Studio, SDK, and DDK/WDK are
 known to work.  OpenAFS for Windows is packaged by Secure Endpoints Inc.
 using the following configurations:
 
@@ -128,14 +128,14 @@ Doxygen is required for Developer Documentation generation
 
     http://www.stack.nl/~dimitri/doxygen/
 
-The NSIS installer requires about 14 MB of storage. The following 
+The NSIS installer requires about 14 MB of storage. The following
 version is supported:
 
     Nullsoft Scriptable Installation System 2.44
       http://sourceforge.net/project/showfiles.php?group_id=22049&package_id=15374
     (Be sure to use the strlen 8192 binaries)
 
-The WiX installer requires about 18 MB of storage.  The following 
+The WiX installer requires about 18 MB of storage.  The following
 version is supported:
 
     Wix 2.0.5325.0
@@ -168,11 +168,11 @@ You will need an unzip utility that can expand compressed tar files.
 For example "Pkzip for Windows" from Pkware will uncompress tar files.
 (http://www.pkware.com/)
 
-Expand the downloaded tar files into target directory (c:\OpenAFS), 
+Expand the downloaded tar files into target directory (c:\OpenAFS),
 the unzip routine will expand the source into a subdirectory tree:
-    c:\OpenAFS\OpenAFS-1.5.61\ 
+    c:\OpenAFS\OpenAFS-1.5.61\
 
-Copy the files 'NTMakefile' and 'ntbuild.bat' from the 'src' 
+Copy the files 'NTMakefile' and 'ntbuild.bat' from the 'src'
 subdirectory to the OpenAFS base directory (aka %AFSROOT%):
 
   From a DOS command prompt window, enter the following copy commands:
@@ -190,7 +190,7 @@ The OpenAFS base directory should look something like the following:
 
 STEP B. Install compiler and development tools.
 
-Install a copy of Microsoft Visual Studio .NET, Visual Studio .NET 2003, 
+Install a copy of Microsoft Visual Studio .NET, Visual Studio .NET 2003,
 or Visual Studio .NET 2005.  Visual Studio 2008 can be used to produce
 builds but the resulting binaries cannot be used on Windows 2000.
 
@@ -207,7 +207,7 @@ STEP C. Install SDK header files.
 
 Files from Microsoft's Platform SDK for Windows Server 2003 SP1 are
 required to complete a build on Windows 2000/XP/2003.   At a minimum the
-following componets are known to be required: 
+following components are known to be required:
 
   * Core
   * Data Access
@@ -242,11 +242,11 @@ These files come from the following Microsoft DDKs/SDKs:
 
 STEP D. Configure NTBUILD.BAT.
 
-The NTBUILD.BAT file copied to the OpenAFS base directory must be 
+The NTBUILD.BAT file copied to the OpenAFS base directory must be
 customized for use on your development system.  The provided NTBUILD.BAT
 was developed for use with Visual Studio 2003 and the Windows Server 2003
 Platform SDK.  It requires significant modification to construct a build
-environment for use with other tools.  
+environment for use with other tools.
 
 The following variables must be defined to match your configuration:
 
@@ -283,9 +283,9 @@ The following variables must be defined to match your configuration:
   MSVCVer:  Set to 8.0 if using Visual Studio 8
 
   CODESIGN_DESC: Product Name
-  
+
   CODESIGN_TIMESTAMP: Time Stamp Service for Code Signing Certificate
-   
+
   CODESIGN_URL: Support URL Displayed to End Users
 
   CODESIGN_CROSS_CERT: Path to Microsoft Cross Signing Certificate
@@ -308,7 +308,7 @@ as appropriate:
     AFSPRODUCT_VER_PATCH - Version Patch Number
     AFSPRODUCT_VER_BUILD - Version Build Number
     CELLSERVDB_INSTALL   - The default file name for the CellServDB
-                     	   included in the install Package.
+	   included in the install Package.
     CELLNAME_DEFAULT     - The default home cell name.
     CELLSERVDB_WEB       - The default web address to obtain CellServDB
 
@@ -329,7 +329,7 @@ one that can be downloaded from the web (CELLSERVDB_WEB).
 
 IMPORTANT: When building your own binaries, you must set the AFSPRODUCT_VER_BUILD
 value to a number greater than 1023.  All values 0 to 1023 are reserved for use
-by official OpenAFS.org releases.  A failure to do so will result in Windows 
+by official OpenAFS.org releases.  A failure to do so will result in Windows
 Crash Reports for your binaries being delivered to OpenAFS.org for analysis.
 
 
@@ -366,7 +366,7 @@ STEP F. Begin the build
 While the build is running you will see many compile warnings. This
 behavior is normal; the build process is successful as long as the build
 process doesn't terminate with an error ("nmake.exe return code 0x2")
-and it displays 'Build Finished Successfully'.  Note that although the 
+and it displays 'Build Finished Successfully'.  Note that although the
 the build target is "install", it does not install OpenAFS.
 
 (5) Before rebuilding you must clean the work area:
@@ -381,10 +381,10 @@ Download the Nullsoft Scriptable Installation System (NSIS) 2.44 from
     http://nsis.sourceforge.net/home/
 
 Run the nsis-2.33.exe installer and install to "C:\Program Files\NSIS".
-Then download the large strings build zip file and replace the installed 
-files with the versions from the zip file.  These versions increase 
-the maximum string length from 1024 characters to 8192 characters.  
-This is necessary for installation on systems with long PATH environment 
+Then download the large strings build zip file and replace the installed
+files with the versions from the zip file.  These versions increase
+the maximum string length from 1024 characters to 8192 characters.
+This is necessary for installation on systems with long PATH environment
 strings.
 
 Note: The NSIS installer can only be used to produce 32-bit installers.
@@ -398,7 +398,7 @@ From the %AFSROOT% directory execute:
 
 STEP I.  Install Wix MSI Installer
 
-Download the Wix 2.0.5325.0 installer from 
+Download the Wix 2.0.5325.0 installer from
 
     http://prdownloads.sourceforge.net/wix/sources-2.0.5325.0.zip
 
diff --git a/README.DEVEL b/README.DEVEL
index f775c0b..b7b57a8 100644
--- a/README.DEVEL
+++ b/README.DEVEL
@@ -21,7 +21,7 @@ way to do this?)
 
 -- Prototyping and Style --
 Prototypes for all source files in a given dir DDD should be placed
-int the file DDD/DDD_prototypes.h. All externally used (either API
+in the file DDD/DDD_prototypes.h. All externally used (either API
 or used by other source files) routines and variables should be
 prototyped in this file.
 
@@ -34,7 +34,7 @@ Format of the prototype files should look like:
 
 	#ifndef AFS_SRC_DDD_PROTO_H
 	#define AFS_SRC_DDD_PROTO_H
-	
+
 	/* filename.c */
 	prototypes
 
@@ -47,10 +47,10 @@ In most of the existing prototypes, the define is DDD_PROTOTYPES_H, which is
 probably ok as well.
 
 The declaration of the routines should be done in ANSI style. If at some
-later date, it is determined that prototypes don't work on some platform 
+later date, it is determined that prototypes don't work on some platform
 properly, we can use ansi2knr during the compile.
 
-	rettype 
+	rettype
 	routine(argtype arg)
 	{
 
@@ -62,13 +62,13 @@ and should have (void) if no arguments are taken.
 Header files should not contain macros or other definitions unless they
 are used across multiple source files.
 
-All routines should be declared static if they are not used outside that 
+All routines should be declared static if they are not used outside that
 source file.
 
 Compiles on gcc-using machines should strive to handle using
 -Wstrict-prototypes -Werror. (this may take a while)
 
-Routines shall be defined in source prior to use if possible, and 
+Routines shall be defined in source prior to use if possible, and
 prototyped in block at top of file if static.
 
 API documentation in the code should be done using Qt-style Doxygen
diff --git a/README.GIT b/README.GIT
index 3cb11fa..7d7ac1a 100644
--- a/README.GIT
+++ b/README.GIT
@@ -48,7 +48,7 @@ release series. Use git branch -a to see a full list of branches.
 OpenAFS uses the Gerrit code review system to review and merge all changes
 to OpenAFS. More details are at:
 
-    http://wiki.openafs.org/AFSLore/GitDevelopers/
+    http://wiki.openafs.org/GitDevelopers/
 
 including more detailed Git instructions.
 
@@ -58,3 +58,24 @@ that way. Do this by sending mail to openafs-bugs@openafs.org with the
 patch attached. But please use Gerrit if you can; patches sent in as bugs
 will have to be forwarded to Gerrit by someone else, and it's easier for
 everyone if you can enter them into Gerrit yourself.
+
+Backport policy
+------------
+All patches should land on master first, unless the patch fixes a bug
+that only exists in the stable branch.
+
+Once a patch has been accepted into master, anyone can propose
+backports to stable branches.
+
+When cherry-picking a commit from another branch, please append a
+"cherry picked from" section in your commit message. You'll also need
+a separate Change-ID for Gerrit to recognize this as a separate
+change. One workflow to do this:
+
+1) Use "git cherry-pick -ex" to pick your commits onto another branch.
+   The -x option will append the appropriate "cherry picked from"
+   message, and the -e option will open your editor for you to edit
+   the commit message.
+2) In your editor, delete the existing Change-ID line. Save and quit.
+3) Run "git commit --amend", saving and quitting again. Git will run
+   the commit hook and generate a new Change-ID for Gerrit.
diff --git a/README.WARNINGS b/README.WARNINGS
index acf50f2..85928b9 100644
--- a/README.WARNINGS
+++ b/README.WARNINGS
@@ -6,7 +6,7 @@ to reduce the number of warnings in the OpenAFS tree. In an attempt to
 prevent warnings from creeping back in, we now have the ability to break the
 build when new warnings appear.
 
-This is only available for systems with gcc 4.2 or later, and is disabled 
+This is only available for systems with gcc 4.2 or later, and is disabled
 unless the --enable-checking option is supplied to configure. Because we
 can't remove all of the warnings, we permit file by file (and warning by
 warning) disabling of specific warnings. The --enable-checking=all prevents
@@ -21,15 +21,15 @@ disabled in an number of ways.
 You can disable a single warning type in a particular file by using GCC
 pragmas. If a warning can be disabled with a pragma, then the switch to use
 will be listed in the error message you receive from the compiler. Pragmas
-should be wrapped in IGNORE_SOME_GCC_WARNINGS, so that they aren't used 
+should be wrapped in IGNORE_SOME_GCC_WARNINGS, so that they aren't used
 with non-gcc compilers, and can be disabled if desired. For example:
   #ifdef IGNORE_SOME_GCC_WARNINGS
   # pragma GCC diagnostic warning "-Wold-style-definition"
   #endif
 
-If a pragma isn't available for your particular warning, you will need to 
+If a pragma isn't available for your particular warning, you will need to
 disable all warnings for the file in question. You can do this by supplying
-the autoconf macro @CFLAGS_NOERROR@ in the build options for the file. For 
+the autoconf macro @CFLAGS_NOERROR@ in the build options for the file. For
 example:
   lex.yy.o : lex.yy.c y.tab.c
          ${CC} -c ${CFLAGS} @CFLAGS_NOERROR@ lex.yy.c
diff --git a/acinclude.m4 b/acinclude.m4
index 4223bb1..b548b92 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -759,6 +759,11 @@ case $AFS_SYSNAME in
     *_obsd46)   AFS_PARAM_COMMON=param.obsd46.h  ;;
     *_obsd47)   AFS_PARAM_COMMON=param.obsd47.h  ;;
     *_obsd48)   AFS_PARAM_COMMON=param.obsd48.h  ;;
+    *_obsd49)   AFS_PARAM_COMMON=param.obsd49.h  ;;
+    *_obsd50)   AFS_PARAM_COMMON=param.obsd50.h  ;;
+    *_obsd51)   AFS_PARAM_COMMON=param.obsd51.h  ;;
+    *_obsd52)   AFS_PARAM_COMMON=param.obsd52.h  ;;
+    *_obsd53)   AFS_PARAM_COMMON=param.obsd53.h  ;;
     *_linux22)  AFS_PARAM_COMMON=param.linux22.h ;;
     *_linux24)  AFS_PARAM_COMMON=param.linux24.h ;;
     *_linux26)  AFS_PARAM_COMMON=param.linux26.h ;;
@@ -915,6 +920,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
 				     [#include <linux/fs.h>
 				      #include <linux/namei.h>],
 				     [path_lookup(NULL, 0, NULL);])
+		 AC_CHECK_LINUX_FUNC([proc_create],
+				     [#include <linux/proc_fs.h>],
+				     [proc_create(NULL, 0, NULL, NULL);])
 		 AC_CHECK_LINUX_FUNC([rcu_read_lock],
 				     [#include <linux/rcupdate.h>],
 				     [rcu_read_lock();])
@@ -945,6 +953,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
 				  [define to disable the nfs translator])])
 
 		 dnl Assorted more complex tests
+		 LINUX_AIO_NONVECTOR
 		 LINUX_EXPORTS_PROC_ROOT_FS
                  LINUX_KMEM_CACHE_INIT
 		 LINUX_HAVE_KMEM_CACHE_T
@@ -991,6 +1000,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
 		 LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE
 		 LINUX_DENTRY_OPEN_TAKES_PATH
 		 LINUX_D_ALIAS_IS_HLIST
+		 LINUX_HLIST_ITERATOR_NO_NODE
 		 LINUX_IOP_I_CREATE_TAKES_BOOL
 		 LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED
 		 LINUX_IOP_LOOKUP_TAKES_UNSIGNED
@@ -1292,16 +1302,47 @@ dnl checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_HEADER_DIRENT
-AC_CHECK_HEADERS(stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.h grp.h)
-AC_CHECK_HEADERS(netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h)
-AC_CHECK_HEADERS(mntent.h sys/vfs.h sys/param.h sys/fs_types.h sys/fstyp.h)
-AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h sys/pag.h)
-AC_CHECK_HEADERS(windows.h direct.h sys/ipc.h sys/resource.h)
-AC_CHECK_HEADERS(security/pam_modules.h ucontext.h regex.h sys/statvfs.h sys/statfs.h sys/bitypes.h)
+AC_CHECK_HEADERS([ \
+	curses.h \
+	direct.h \
+	et/com_err.h \
+	fcntl.h \
+	grp.h \
+	mntent.h \
+	ncurses.h \
+	ncurses/ncurses.h \
+	netinet/in.h \
+	netdb.h \
+	regex.h \
+	search.h \
+	security/pam_modules.h \
+	signal.h \
+	stdlib.h \
+	string.h \
+	strings.h \
+	sys/bitypes.h \
+	sys/fcntl.h \
+	sys/file.h \
+	sys/fs_types.h \
+	sys/fstyp.h \
+	sys/ipc.h \
+	sys/mntent.h \
+	sys/mnttab.h \
+	sys/mount.h \
+	sys/pag.h \
+	sys/param.h \
+	sys/resource.h \
+	sys/statfs.h \
+	sys/statvfs.h \
+	sys/time.h \
+	sys/vfs.h \
+	termios.h \
+	ucontext.h \
+	unistd.h \
+	windows.h \
+])
+
 AC_CHECK_HEADERS(linux/errqueue.h,,,[#include <linux/types.h>])
-AC_CHECK_HEADERS(et/com_err.h)
-AC_CHECK_HEADERS(ncurses.h ncurses/ncurses.h curses.h)
-AC_CHECK_HEADERS(search.h)
 
 AC_CHECK_TYPES([fsblkcnt_t],,,[
 #include <sys/types.h>
@@ -1354,12 +1395,41 @@ else
 fi
 AC_SUBST(BUILD_LOGIN)
 
-AC_CHECK_FUNCS(snprintf strlcat strlcpy flock getrlimit strnlen tsearch)
-AC_CHECK_FUNCS(setprogname getprogname sigaction mkstemp vsnprintf strerror strcasestr)
-AC_CHECK_FUNCS(setvbuf vsyslog getcwd)
-AC_CHECK_FUNCS(regcomp regexec regerror)
-AC_CHECK_FUNCS(fseeko64 ftello64 poll pread preadv pwrite pwritev preadv64 pwritev64)
-AC_CHECK_FUNCS([setenv unsetenv])
+AC_CHECK_FUNCS([ \
+	daemon \
+	flock \
+	fseeko64 \
+	ftello64 \
+	getcwd \
+	getprogname \
+	getrlimit \
+	mkstemp \
+	poll \
+	pread \
+	preadv \
+	preadv64 \
+	pwrite \
+	pwritev \
+	pwritev64 \
+	regcomp \
+	regerror \
+	regexec \
+	setenv \
+	setprogname \
+	setvbuf \
+	sigaction \
+	snprintf \
+	strcasestr \
+	strerror \
+	strlcat \
+	strlcpy \
+	strnlen \
+	timegm \
+	tsearch \
+	unsetenv \
+	vsnprintf \
+	vsyslog \
+])
 
 case $AFS_SYSNAME in
 *hp_ux* | *hpux*)
@@ -1419,8 +1489,6 @@ AC_SIZEOF_TYPE(long)
 
 AC_HEADER_PAM_CONST
 
-AC_CHECK_FUNCS(timegm)
-AC_CHECK_FUNCS(daemon)
 
 dnl Directory PATH handling
 if test "x$enable_transarc_paths" = "xyes"  ; then 
diff --git a/configure-libafs.ac b/configure-libafs.ac
index 11ac87e..e9ba4ca 100644
--- a/configure-libafs.ac
+++ b/configure-libafs.ac
@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR(src/libafs/Makefile.common.in)
 AM_INIT_AUTOMAKE
 
 AC_CONFIG_HEADER(src/config/afsconfig.h)
-MACOS_VERSION=1.6.3d1
+MACOS_VERSION=1.6.4
 
 AC_SUBST(MACOS_VERSION)
 
diff --git a/configure.ac b/configure.ac
index 00ea4a9..42dec33 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,8 +5,8 @@ AC_CONFIG_SRCDIR([src/config/stds.h])
 AM_INIT_AUTOMAKE
 
 AC_CONFIG_HEADER(src/config/afsconfig.h)
-MACOS_VERSION=1.6.3d1
-LINUX_PKGVER=1.6.2.1
+MACOS_VERSION=1.6.4
+LINUX_PKGVER=1.6.4
 
 dnl Debian wants the release candidate version in the main upstream version,
 dnl and wants ~ before it.
diff --git a/doc/README b/doc/README
index c2135c8..c9fd64c 100644
--- a/doc/README
+++ b/doc/README
@@ -1,20 +1,20 @@
 What's in the "doc" subdirectory
 
 ** doc/html
-original ibm html doc, no longer used
+original IBM html doc, no longer used
 
 ** doc/man-pages
-pod sources for man pages (converted from original ibm html source).
+pod sources for man pages (converted from original IBM html source).
 
 ** doc/xml
-xml sources for manuals (converted from original ibm html source).  there is
+xml sources for manuals (converted from original IBM html source).  there is
 some generated pdf/html content as well for the curious.
 
 Note that doc/xml/AdminReference uses doc/xml/AdminReference/pod2refentry to
 convert the pod man pages to xml for printing.  pod goes directly to html
 just fine.
 
-The reference guide is now built by converting the existing pod documention
+The reference guide is now built by converting the existing pod documentation
 to xml.  however, the indexing information was lost during the initial pod
 conversion.  Someone we will need to try to get that back.
 
@@ -36,7 +36,7 @@ current behavior of OpenAFS (for example, there's no documentation of
 dynroot, no mention of Kerberos v5, many fileserver options are
 undocumented, the afsd switch documentation is out of date, and so forth).
 I've collected as many of those deficiencies as I know of in
-doc/man-pages/README.  Any contributions to correct any of those deficiences
+doc/man-pages/README.  Any contributions to correct any of those deficiencies
 are very welcome.  This is one easy place to start.
 
 The other reference manuals (the Administrator's Guide, the Quick Start
diff --git a/doc/man-pages/README b/doc/man-pages/README
index b76a072..e9caf70 100644
--- a/doc/man-pages/README
+++ b/doc/man-pages/README
@@ -26,12 +26,17 @@ Overview
 
   The OpenAFS man pages are discussed on the openafs-doc mailing list at
   openafs.org.  If you plan on contributing to the man page project,
-  please join that mailing list and send suggestions, patches, and
+  please join that mailing list and send suggestions, patches*, and
   contributions there.  The coordinator of the OpenAFS man page project is
   Russ Allbery <rra@stanford.edu>; feel free to contact me directly with
   questions (although using the mailing list is generally better and will
   probably result in a faster response).
 
+  * Although we still accept patch submissions to the list, it is
+    greatly preferred that you make your submission through Git to
+    the OpenAFS Gerrit instance (code review system).  Information
+    can be found at <http://wiki.openafs.org/GitDevelopers/>
+
 POD and Man Page Generation
 
   The OpenAFS man pages are maintained in POD (Plain Old Documentation),
@@ -267,17 +272,11 @@ Known Problems
 
    * Document vos restore -creation/-lastupdate and -nodelete
 
-   * Document vos delentry -noexecute. Should this option also be renamed
-     to -dryrun like others?
-
    Man section 8 suite commands:
 
    * Mention bos (un)blockscanner in bos.pod text, not just in See Also
      at the end
 
-   * Update fstrace source to include option descriptions (for content,
-     use existing manpage information "condensed" to half line of text)
-
    * Update backup source to include option descriptions (for content,
      use existing manpage information "condensed" to half line of text)
 
diff --git a/doc/man-pages/pod1/aklog.pod b/doc/man-pages/pod1/aklog.pod
index ab0ad19..a6c881e 100644
--- a/doc/man-pages/pod1/aklog.pod
+++ b/doc/man-pages/pod1/aklog.pod
@@ -186,39 +186,39 @@ The exit status of B<aklog> will be one of the following:
 
 =over 3
 
-=item 0
+=item C<0>
 
 Success -- No error occurred.
 
-=item 1
+=item C<1>
 
 Usage -- Bad command syntax; accompanied by a usage message.
 
-=item 2
+=item C<2>
 
 Something failed -- More than one cell or pathname was given on the
 command line and at least one failure occurred.  A more specific error
 status is returned when only one directive is given.
 
-=item 3
+=item C<3>
 
 AFS -- Unable to get AFS configuration or unable to get information about
 a specific cell.
 
-=item 4
+=item C<4>
 
 Kerberos -- Unable to get tickets for authentication.
 
-=item 5
+=item C<5>
 
 Token -- Unable to get tokens.
 
-=item 6
+=item C<6>
 
 Bad pathname -- The path given was not a directory or lstat(2) failed on
 some component of the pathname.
 
-=item 7
+=item C<7>
 
 Miscellaneous -- An internal failure occurred.  For example, B<aklog>
 returns this if it runs out of memory.
diff --git a/doc/man-pages/pod1/vos_delentry.pod b/doc/man-pages/pod1/vos_delentry.pod
index c5d36df..14e967a 100644
--- a/doc/man-pages/pod1/vos_delentry.pod
+++ b/doc/man-pages/pod1/vos_delentry.pod
@@ -12,13 +12,13 @@ B<vos delentry> S<<< [B<-id> <I<volume name or ID>>+] >>>
     S<<< [B<-server> <I<machine name>>] >>>
     S<<< [B<-partition> <I<partition name>>] >>>
     S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>]
-    [B<-verbose>] [B<-encrypt>] [B<-noresolve>] [B<-help>]
+    [B<-dryrun>] [B<-verbose>] [B<-encrypt>] [B<-noresolve>] [B<-help>]
 
 B<vos de> S<<< [B<-i> <I<volume name or ID>>+] >>>
     S<<< [B<-pr> <I<prefix of volume whose VLDB entry is to be deleted>>] >>>
     S<<< [B<-s> <I<machine name>>] >>> S<<< [B<-pa> <I<partition name>>] >>>
     S<<< [B<-c> <I<cell name>>] >>> [B<-noa>] [B<-l>]
-    [B<-v>] [B<-e>] [B<-nor>] [B<-h>]
+    [B<-d>] [B<-v>] [B<-e>] [B<-nor>] [B<-h>]
 
 =for html
 </div>
@@ -141,6 +141,10 @@ to the Volume Server and Volume Location Server during mutual
 authentication. Do not combine this flag with the B<-cell> argument or
 B<-noauth> flag. For more details, see L<vos(1)>.
 
+=item B<-dryrun>
+
+Show the actions which would be taken, but do not make changes.
+
 =item B<-verbose>
 
 Produces on the standard output stream a detailed trace of the command's
diff --git a/doc/man-pages/pod1/xstat_cm_test.pod b/doc/man-pages/pod1/xstat_cm_test.pod
index 5943133..06d67af 100644
--- a/doc/man-pages/pod1/xstat_cm_test.pod
+++ b/doc/man-pages/pod1/xstat_cm_test.pod
@@ -54,19 +54,19 @@ There are three acceptable values:
 
 =over 4
 
-=item 0
+=item C<0>
 
 Provides profiling information about the numbers of times different
 internal Cache Manager routines were called since the Cache Manager
 started.
 
-=item 1
+=item C<1>
 
 Reports various internal performance statistics related to the Cache
 Manager (for example, statistics about how effectively the cache is being
 used and the quantity of intracell and intercell data access).
 
-=item 2
+=item C<2>
 
 Reports all of the internal performance statistics provided by the C<1>
 setting, plus some additional, detailed performance figures (for example,
diff --git a/doc/man-pages/pod1/xstat_fs_test.pod b/doc/man-pages/pod1/xstat_fs_test.pod
index 6d99702..7c2257d 100644
--- a/doc/man-pages/pod1/xstat_fs_test.pod
+++ b/doc/man-pages/pod1/xstat_fs_test.pod
@@ -52,25 +52,25 @@ There are four acceptable values:
 
 =over 4
 
-=item 0
+=item C<0>
 
 Provides profiling information about the numbers of times different
 internal File Server routines were called since the File Server
 started. This value is not currently implemented; it returns no data.
 
-=item 1
+=item C<1>
 
 Reports various internal performance statistics related to the File Server
 (for example, vnode cache entries and Rx protocol activity).
 
-=item 2
+=item C<2>
 
 Reports all of the internal performance statistics provided by the C<1>
 setting, plus some additional, detailed performance figures about the File
 Server (for example, minimum, maximum, and cumulative statistics regarding
 File Server RPCs, how long they take to complete, and how many succeed).
 
-=item 3
+=item C<3>
 
 Reports File Server callback processing statistics since the File Server
 started, including the number of call of callbacks added (AddCallBack), the
diff --git a/doc/man-pages/pod8/afsd.pod b/doc/man-pages/pod8/afsd.pod
index 9d76326..932e8c6 100644
--- a/doc/man-pages/pod8/afsd.pod
+++ b/doc/man-pages/pod8/afsd.pod
@@ -536,6 +536,16 @@ the F<CellAlias> file can be used to provide shortname for common AFS cells
 which provides equivalent functionality to the most commonly used symbolic
 links.
 
+When the dynamic root (B<-dynroot>, B<-dynroot-sparse>) and the fake stat
+(B<-fakestat>, B<-fakestat-all>) modes are in effect, the cache manager
+provides a special directory named F</afs/.:mount> which allows access to
+volumes by volume name or ID.  The F</afs/.:mount> directory appears to be
+empty, but any name in the form of I<cell>:I<volume> will be resolved as a
+read-write mount point to the specified volume.  This dynamic mount feature is
+recommended only for temporary access to a volume.  Linux-based cache managers
+provide this dynamic mount feature even when dynamic root (B<-dynroot>,
+B<-dynroot-sparse>) is not in effect.
+
 =item B<-dynroot-sparse>
 
 In addition to operating in the manner described for dynroot above,
diff --git a/doc/man-pages/pod8/backup_addvolentry.pod b/doc/man-pages/pod8/backup_addvolentry.pod
index c62ebed..fba324b 100644
--- a/doc/man-pages/pod8/backup_addvolentry.pod
+++ b/doc/man-pages/pod8/backup_addvolentry.pod
@@ -90,30 +90,30 @@ expressions:
 
 =over 4
 
-=item .
+=item C<.>
 
 The period matches any single character.
 
-=item *
+=item C<*>
 
 The asterisk matches zero or more instances of the preceding character.
 Combine it with any other alphanumeric character or metacharacter.
 
-=item [ ]
+=item C<[ ]>
 
 Square brackets around a list of characters match a single instance of any
 of the characters, but no other characters; for example, C<[abc]> matches
 a single C<a> or C<b> or C<c>, but not C<d> or C<A>. This expression can
 be combined with the asterisk.
 
-=item ^
+=item C<^>
 
 The caret, when used as the first character in a square-bracketed set,
 designates a match with any single character I<except> the characters that
 follow it; for example, C<[^a]> matches any single character except
 lowercase C<a>. This expression can be combined with the asterisk.
 
-=item \
+=item C<\>
 
 A backslash preceding any of the metacharacters in this list makes it
 match its literal value only. For example, the expression C<\.> (backslash
diff --git a/doc/man-pages/pod8/bos_setrestricted.pod b/doc/man-pages/pod8/bos_setrestricted.pod
index 353edf8..1c11477 100644
--- a/doc/man-pages/pod8/bos_setrestricted.pod
+++ b/doc/man-pages/pod8/bos_setrestricted.pod
@@ -15,12 +15,12 @@ B<bos setrestricted> S<<< B<-server> <I<machine name>> >>> S<<< B<-mode> 1 >>>
 
 =head1 DESCRIPTION
 
-The B<bos restricted> command places the server in restricted mode. This
+The B<bos setrestricted> command places the server in restricted mode. This
 mode increases the security of the bos server by removing access to a
 number of bos commands that are only used whilst configuring a system.
 
 When a server is in restricted mode, access to B<bos_exec>, B<bos uninstall>,
-B<bos install>, B<bos create>, B<bos install>, B<bos delete>, B<bos prune>
+B<bos install>, B<bos create>, B<bos delete>, B<bos prune>
 is denied, and the use of B<bos getlog> is limited.
 
 =head1 CAUTIONS
diff --git a/doc/man-pages/pod8/fragments/fileserver-options.pod b/doc/man-pages/pod8/fragments/fileserver-options.pod
index 0215a5a..89cad7d 100644
--- a/doc/man-pages/pod8/fragments/fileserver-options.pod
+++ b/doc/man-pages/pod8/fragments/fileserver-options.pod
@@ -296,3 +296,108 @@ consequences.  This option is not supported on platforms other than AIX.
 Prevents any portion of the fileserver binary from being paged (swapped)
 out of memory on a file server machine running the IRIX operating system.
 This option is not supported on platforms other than IRIX.
+
+=item B<-sync> <always | delayed | onclose | never>
+
+This option changes how hard the fileserver tries to ensure that data written
+to volumes actually hits the physical disk.
+
+Normally, when the fileserver writes to disk, the underlying filesystem or
+Operating System may delay writes from actually going to disk, and reorder
+which writes hit the disk first. So, during an unclean shutdown of the machine
+(if the power goes out, or the machine crashes, etc), or if the physical disk
+backing store becomes unavailable, file data may become lost that the server
+previously told clients was already successfully written.
+
+To try to mitigate this, the fileserver will try to "sync" file data to the
+physical disk at numerous points during various I/O. However, this can result
+in significantly reduced performance. Depending on the usage patterns, this may
+or may not be acceptable. This option dictates specifically what the fileserver
+does when it wants to perform a "sync".
+
+There are several options; pass one of these as the argument to -sync. The
+default is C<delayed>.
+
+=over 4
+
+=item always
+
+This causes a sync operation to always sync immediately and synchronously.
+This is the slowest option that provides the greatest protection against data
+loss in the event of a crash or backing store unavailability.
+
+Note that this is still not a 100% guarantee that data will not be lost or
+corrupted during a crash. The underlying filesystem itself may cause data to
+be lost or corrupt in such a situation. And OpenAFS itself does not (yet) even
+guarantee that all data is consistent at any point in time; so even if the
+filesystem and OS do not buffer or reorder any writes, you are not guaranteed
+that all data will be okay after a crash.
+
+This option may be appropriate if you have reason to believe a server is prone
+to data loss failures, such as if the server encounters frequent power failures
+or connectivity issues with network attached storage. Or if the backend storage
+is temporarily degraded in some way (for example, a battery on a caching
+controller fails), it may make sense to temporarily use the C<always> option
+until the situation is fixed. Some servers may also allow for sync operations
+to occur very quickly, such that the C<always> option is not noticeably slower
+than any other option. In such a case, there is no downside to specifying
+C<always>.
+
+This was the only behavior allowed in OpenAFS releases prior to 1.4.5.
+
+=item delayed
+
+This causes a sync to do nothing immediately, but the sync will happen sometime
+in the background, within approximately the next 10 seconds. This works by
+having a separate thread that goes through all open file handles every 10
+seconds, and it syncs the ones that have been marked as needing a sync. File
+handles flagged for sync may also get synced on volume detachment, according to
+the same behavior as with the C<onclose> option.
+
+This option is currently not recommended, since in the past the code
+implementing this option has caused rare data corruption during normal
+operation. However, it is currently the default option to allow consistent
+behavior from previous OpenAFS releases.
+
+This was the only behavior allowed in OpenAFS releases starting from 1.4.5 up
+to and including 1.6.2. It is the default starting in OpenAFS 1.6.3. This
+option will be removed in a future version of OpenAFS, and the default behavior
+will likely change to the C<onclose> behavior.
+
+=item onclose
+
+This causes a sync to do nothing immediately, but causes the relevant file to
+be flagged as potentially needing a sync. When a volume is detached, flagged
+volume metadata files are synced, as well as data files that have been accessed
+recently. Events that cause a volume to detach include: performing certain
+volume operations (restore, salvage, offline, et al), detection of volume
+consistency errors, a clean shutdown of the fileserver, or during DAFS "soft
+detachment".
+
+Effectively this option is the same as C<never> while a volume is attached and
+actively being used, but if a volume is detached, there is an additional
+guarantee for the data's consistency.
+
+=item never
+
+This causes all syncs to never do anything. This is the fastest option, with
+the weakest guarantees for data consistency.
+
+Depending on the underlying filesystem and Operating System, there may be
+guarantees that any data written to disk will hit the physical media after a
+certain amount of time. For example, Linux's pdflush process usually makes this
+guarantee, and ext3 can make certain various consistency guarantees according
+to the options given. ZFS on Solaris can also provide similar guarantees, as
+can various other platforms and filesystems. Consult the documentation for
+your platform if you are unsure.
+
+=back
+
+Which option you choose is not an easy decision to make. Various developers and
+experts sometimes disagree on which option is the most reasonable, and it may
+depend on the specific scenario and workload involved. Some argue that the
+C<always> option does not provide significantly greater guarantees over any
+other option, whereas others argue that choosing anything besides the C<always>
+option allows for an unacceptable risk of data loss. This may depend on your
+usage patterns, your hardware, your platform and filesystem, and who you talk
+to about this topic.
diff --git a/doc/man-pages/pod8/fragments/fileserver-synopsis.pod b/doc/man-pages/pod8/fragments/fileserver-synopsis.pod
index eb4c846..ba20687 100644
--- a/doc/man-pages/pod8/fragments/fileserver-synopsis.pod
+++ b/doc/man-pages/pod8/fragments/fileserver-synopsis.pod
@@ -45,3 +45,4 @@ B<fileserver>
     S<<< [B<-vattachpar> <I<number of volume attach threads>>] >>>
     S<<< [B<-m> <I<min percentage spare in partition>>] >>>
     S<<< [B<-lock>] >>>
+    S<<< [B<-sync> <I<sync behavior>>] >>>
diff --git a/doc/man-pages/pod8/fragments/volserver-options.pod b/doc/man-pages/pod8/fragments/volserver-options.pod
index 3c61666..a2b98e2 100644
--- a/doc/man-pages/pod8/fragments/volserver-options.pod
+++ b/doc/man-pages/pod8/fragments/volserver-options.pod
@@ -74,6 +74,11 @@ user.admin PTS entry. Sites whose Kerberos realms don't have these collisions
 between principal names may disable this check by starting the server
 with this option.
 
+=item B<-sync> <I<sync behavior>>
+
+This is the same as the B<-sync> option in L<fileserver(8)>. See
+L<fileserver(8)>.
+
 =item B<-help>
 
 Prints the online help for this command. All other valid options are
diff --git a/doc/man-pages/pod8/fragments/volserver-synopsis.pod b/doc/man-pages/pod8/fragments/volserver-synopsis.pod
index 03ca28a..d5fca73 100644
--- a/doc/man-pages/pod8/fragments/volserver-synopsis.pod
+++ b/doc/man-pages/pod8/fragments/volserver-synopsis.pod
@@ -6,3 +6,4 @@ B<volserver>
     [B<-nojumbo>] [B<-jumbo>] 
     [B<-enable_peer_stats>] [B<-enable_process_stats>] 
     [B<-allow-dotted-principals>] [B<-help>]
+    [B<-sync> <I<sync behavior>>]
diff --git a/doc/man-pages/pod8/volinfo.pod b/doc/man-pages/pod8/volinfo.pod
index 5215428..e994656 100644
--- a/doc/man-pages/pod8/volinfo.pod
+++ b/doc/man-pages/pod8/volinfo.pod
@@ -10,7 +10,7 @@ volinfo - Produces detailed statistics about AFS volume headers
 B<volinfo> [B<-online>] [B<-vnode>] [B<-date>] [B<-inode>] [B<-itime>]
     S<<< [B<-part> <I<AFS partition name (default current partition)>>+] >>>
     S<<< [B<-volumeid> <I<volume id>>+] >>> [B<-header>] [B<-sizeOnly>]
-    [B<-fixheader>] [B<-saveinodes>] [B<-orphaned>] [B<-help>]
+    [B<-fixheader>] [B<-saveinodes>] [B<-orphaned>] [B<-filenames>] [B<-help>]
 
 =for html
 </div>
@@ -100,6 +100,13 @@ Displays a large vnode and small vnode table for each volume, which lists
 only orphaned vnodes (vnodes that have no parent). If there are none, the
 tables are empty (only the headers appear).
 
+=item B<-filenames>
+
+When combined with the B<-vnode> flag, adds the full path and file name of the
+C<namei> file which stores the vnode data to each vnode entry in the large vnode
+and small vnode tables. This option is only available on fileservers which use
+the C<namei> storage format for storing data.
+
 =item B<-help>
 
 Prints the online help for this command. All other valid options are
diff --git a/doc/txt/README.linux-nfstrans b/doc/txt/README.linux-nfstrans
index c71342f..901080f 100644
--- a/doc/txt/README.linux-nfstrans
+++ b/doc/txt/README.linux-nfstrans
@@ -31,7 +31,7 @@ It has been integrated into OpenAFS 1.5.x.
   clients to reevaluate directory lookups any time the sysname changes.
 - Fixed several bugs related to sysname handling
 - Fixed a bug preventing 'fs exportafs' from changing the flag which
-  controlls whether callbacks are made to NFS clients to obtain tokens
+  controls whether callbacks are made to NFS clients to obtain tokens
   and sysname lists.
 - Starting in this version, when the PAG manager starts up, it makes a
   call to the translator to discard any tokens belonging to that client.
@@ -70,7 +70,7 @@ in order to prevent the common NFS server code from performing unwanted
 access checks, and an fsid option must be provided to set the filesystem
 identifier to be used in NFS filehandles.  Note that for live migration
 to work, a consistent filesystem id must be used on all translator systems.
-The export may be accomplised with a line in /etc/exports:
+The export may be accomplished with a line in /etc/exports:
 
     /afs (rw,no_subtree_check,fsid=42)
 
@@ -130,7 +130,7 @@ AFS-specific operations via the remote system call interface (rmtsys).
 To enable this feature, afsd must be run with the -rmtsys switch.  OpenAFS
 client utilities will use this feature automatically if the AFSSERVER
 environment variable is set to the address or hostname of the translator
-system, or if the file ~/.AFSSERVER or /.AFSSERVER exists and contains the 
+system, or if the file ~/.AFSSERVER or /.AFSSERVER exists and contains the
 translator's address or hostname.
 
 On systems running the client PAG manager (afspag.ko), AFS system calls
@@ -155,7 +155,7 @@ changes such that it is talking to a different translator.
 This feature is automatically supported by the PAG manager if it has
 been configured to forward system calls to an NFS translator.  However,
 requests will be honored only if they come from port 7001 on the NFS
-translator host.  In addition, this feature must be enabld on the NFS
+translator host.  In addition, this feature must be enabled on the NFS
 translator system as described above.
 
 
@@ -168,7 +168,7 @@ with credential caching and retrieval is enabled as described above.
 
 The PAG manager maintains a system-wide sysname list, which is used to
 satisfy callback requests from the NFS translator.  This list is set
-intially to contain only the compiled-in default sysname, but can be
+initially to contain only the compiled-in default sysname, but can be
 changed by the superuser using the VIOC_AFS_SYSNAME pioctl or the
 'fs sysname' command.  Any changes are automatically propagated to the
 NFS translator.
@@ -176,7 +176,7 @@ NFS translator.
 
 ## Dynamic Mount Points
 
-This patch introduces a special directory ".:mount", which can be found 
+This patch introduces a special directory ".:mount", which can be found
 directly below the AFS root directory.  This directory always appears to
 be empty, but any name of the form "cell:volume" will resolve to a mount
 point for the specified volume.  The resulting mount points are always
@@ -193,11 +193,13 @@ a volume which is no longer in the cache (and thus has no known mount
 point), it will complete the path to the AFS root using the dynamic
 mount directory.
 
-This feature is available whenever the dynamic AFS root is enabled.
+On non-linux cache managers, this feature is available when dynamic
+root and fake stat modes are enabled.
+
 On Linux systems, it is also available even when dynroot is not enabled,
 to support the NFS translator.  It is presently not possible to disable
 this feature, though that ability may be added in the future.  It would
-be difficult to make this feature unavailble to users and still make the
+be difficult to make this feature unavailable to users and still make the
 Linux NFS translator work, since the point of the check being performed
 by the NFS server is to ensure the requested file would be reachable by
 the client.
diff --git a/doc/xml/AdminGuide/auagd010.xml b/doc/xml/AdminGuide/auagd010.xml
index 3ff309e..63e8067 100644
--- a/doc/xml/AdminGuide/auagd010.xml
+++ b/doc/xml/AdminGuide/auagd010.xml
@@ -2777,6 +2777,12 @@
       recommended for temporary access to a volume. For example, if you
       have recently restored a volume from a backup, you can use this
       syntax to quickly access the volume without mounting it.</para>
+
+      <para>This feature is available with Windows and Linux based cache
+      managers by default. This feature is available with other Unix based
+      cache managers when the dynamic root (-dynroot) and fake stat
+      (-fakestat) modes are enabled.</para>
+
       <para>Examples:</para>
       <itemizedlist>
           <listitem>
diff --git a/doc/xml/QuickStartUnix/appendix.xml b/doc/xml/QuickStartUnix/appendix.xml
index c450cb9..4cc9910 100644
--- a/doc/xml/QuickStartUnix/appendix.xml
+++ b/doc/xml/QuickStartUnix/appendix.xml
@@ -671,7 +671,7 @@ ll name</replaceable>&gt; <emphasis
               change directory as indicated, and copy them.</para>
 
 <programlisting>
-   # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/root.client/usr/vice/etc</emphasis>
+   # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/dest/root.client/usr/vice/etc</emphasis>
    # <emphasis role="bold">cp  -p  afs_dynamic*  /usr/vice/etc</emphasis>
 </programlisting>
             </listitem>
@@ -897,14 +897,14 @@ ll name</replaceable>&gt; <emphasis
             (<emphasis role="bold">kaserver</emphasis> process) in the cell:</para>
 
 <programlisting>
-   # <emphasis role="bold">cp /tmp/afsdist/hp_ux110/lib/pam_afs.so.1  .</emphasis>
+   # <emphasis role="bold">cp /tmp/afsdist/hp_ux110/dest/lib/pam_afs.so.1  .</emphasis>
    # <emphasis role="bold">ln -s  pam_afs.so.1  pam_afs.so</emphasis>   
 </programlisting>
 
             <para>If you use a Kerberos implementation of AFS authentication:</para>
 
 <programlisting>
-   # <emphasis role="bold">cp /tmp/afsdist/hp_ux110/lib/pam_afs.krb.so.1   .</emphasis>
+   # <emphasis role="bold">cp /tmp/afsdist/hp_ux110/dest/lib/pam_afs.krb.so.1   .</emphasis>
    # <emphasis role="bold">ln -s pam_afs.krb.so.1 pam_afs.so</emphasis>
 </programlisting>
           </listitem>
@@ -1022,7 +1022,7 @@ ll name</replaceable>&gt; <emphasis
         them.</para>
 
 <programlisting>
-   # <emphasis role="bold">cd /tmp/afsdist/sgi_65/root.client/usr/vice/etc</emphasis>
+   # <emphasis role="bold">cd /tmp/afsdist/sgi_65/dest/root.client/usr/vice/etc</emphasis>
    # <emphasis role="bold">cp  -p  *authlib*  /usr/vice/etc</emphasis>   
 </programlisting>
 
@@ -1570,14 +1570,14 @@ localusertwo:&lt;thelocalusertwo'skey&gt;:11500:0:99999:7:::
             (<emphasis role="bold">kaserver</emphasis> process):</para>
 
 <programlisting>
-   # <emphasis role="bold">cp /tmp/afsdist/sun4x_56/lib/pam_afs.so.1 .</emphasis>
+   # <emphasis role="bold">cp /tmp/afsdist/sun4x_56/dest/lib/pam_afs.so.1 .</emphasis>
    # <emphasis role="bold">ln -s pam_afs.so.1 pam_afs.so</emphasis>   
 </programlisting>
 
             <para>If you use a Kerberos implementation of AFS authentication:</para>
 
 <programlisting>
-   # <emphasis role="bold">cp /tmp/afsdist/sun4x_56/lib/pam_afs.krb.so.1 .</emphasis>
+   # <emphasis role="bold">cp /tmp/afsdist/sun4x_56/dest/lib/pam_afs.krb.so.1 .</emphasis>
    # <emphasis role="bold">ln -s pam_afs.krb.so.1 pam_afs.so</emphasis>
 </programlisting>
           </listitem>
@@ -1673,4 +1673,4 @@ localusertwo:&lt;thelocalusertwo'skey&gt;:11500:0:99999:7:::
       </para>
     </sect2>
   </sect1>
-</appendix>
\ No newline at end of file
+</appendix>
diff --git a/doc/xml/QuickStartUnix/auqbg005.xml b/doc/xml/QuickStartUnix/auqbg005.xml
index ddb0199..66897ec 100644
--- a/doc/xml/QuickStartUnix/auqbg005.xml
+++ b/doc/xml/QuickStartUnix/auqbg005.xml
@@ -502,7 +502,7 @@
             examples. Once you have unpacked the distribution, 
             change directory as indicated.
 <programlisting>
-   # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/root.client/usr/vice/etc</emphasis>
+   # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/dest/root.client/usr/vice/etc</emphasis>
 </programlisting></para>
           </listitem>
 
@@ -679,7 +679,7 @@
 <programlisting>
    # <emphasis role="bold">cd /sbin/helpers</emphasis>
    # <emphasis role="bold">mv v3fshelper v3fshelper.noafs</emphasis>
-   # <emphasis role="bold">cp -p /tmp/afsdist/rs_aix42/root.server/etc/v3fshelper v3fshelper</emphasis>
+   # <emphasis role="bold">cp -p /tmp/afsdist/rs_aix42/dest/root.server/etc/v3fshelper v3fshelper</emphasis>
 </programlisting></para>
           </listitem>
 
@@ -812,7 +812,7 @@
             examples. Once you have unpacked the distribution, change directory 
             as indicated.
             <programlisting>
-   # <emphasis role="bold">cd /tmp/afsdist/hp_ux110/root.client</emphasis>
+   # <emphasis role="bold">cd /tmp/afsdist/hp_ux110/dest/root.client</emphasis>
 </programlisting></para>
           </listitem>
 
@@ -1053,7 +1053,7 @@
             <para>Copy the AFS-modified version of the <emphasis role="bold">fsck</emphasis> program (the <emphasis
             role="bold">vfsck</emphasis> binary) and related files from the distribution directory to the new AFS-specific command
             directory. <programlisting>
-   # <emphasis role="bold">cp -p /tmp/afsdist/hp_ux110/root.server/etc/*  .</emphasis>
+   # <emphasis role="bold">cp -p /tmp/afsdist/hp_ux110/dest/root.server/etc/*  .</emphasis>
 </programlisting></para>
           </listitem>
 
@@ -1253,7 +1253,7 @@
           examples. Once you have unpacked the distribution, change directory
           as indicated.
 <programlisting>
-   # <emphasis role="bold">cd  /tmp/afsdist/sgi_65/root.client</emphasis>
+   # <emphasis role="bold">cd  /tmp/afsdist/sgi_65/dest/root.client</emphasis>
 </programlisting></para>
         </listitem>
 
@@ -1817,7 +1817,7 @@
             examples. Once you have unpacked the distribution,
             change directory as indicated.
 <programlisting>
-  # <emphasis role="bold">cd /tmp/afsdist/linux/root.client/usr/vice/etc</emphasis>
+  # <emphasis role="bold">cd /tmp/afsdist/linux/dest/root.client/usr/vice/etc</emphasis>
 </programlisting></para>
           </listitem>
           
@@ -2125,7 +2125,7 @@ auth  required                pam_unix.so try_first_pass</literallayout>
             exmaples. Once you have unpacked the distribution, change directory
             as indicated. 
 <programlisting>
-   # <emphasis role="bold">cd  /tmp/afsdist/sun4x_56/root.client/usr/vice/etc</emphasis>
+   # <emphasis role="bold">cd  /tmp/afsdist/sun4x_56/dest/root.client/usr/vice/etc</emphasis>
 </programlisting></para>
           </listitem>
 
@@ -2141,6 +2141,18 @@ auth  required                pam_unix.so try_first_pass</literallayout>
             <para>Copy the appropriate AFS kernel library file to the local file <emphasis
             role="bold">/kernel/fs/afs</emphasis>.</para>
 
+            <para>If the machine is running Solaris 11 on the x86_64 platform:</para>
+
+            <programlisting>
+   # <emphasis role="bold">cp -p modload/libafs64.o /kernel/drv/amd64/afs</emphasis>
+</programlisting>
+
+            <para>If the machine is running Solaris 10 on the x86_64 platform:</para>
+
+            <programlisting>
+   # <emphasis role="bold">cp -p modload/libafs64.o /kernel/fs/amd64/afs</emphasis>
+</programlisting>
+
             <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, its kernel supports NFS server
             functionality, and the <emphasis role="bold">nfsd</emphasis> process is running:</para>
 
@@ -2244,7 +2256,7 @@ auth  required                pam_unix.so try_first_pass</literallayout>
           <listitem>
             <para>Copy the <emphasis role="bold">vfsck</emphasis> binary to the newly created directory, changing the name as you do
             so. <programlisting>
-   # <emphasis role="bold">cp  /tmp/afsdist/sun4x_56/root.server/etc/vfsck  fsck</emphasis>
+   # <emphasis role="bold">cp  /tmp/afsdist/sun4x_56/dest/root.server/etc/vfsck  fsck</emphasis>
 </programlisting></para>
           </listitem>
 
diff --git a/doc/xml/QuickStartUnix/auqbg006.xml b/doc/xml/QuickStartUnix/auqbg006.xml
index c90a9c6..0a50222 100644
--- a/doc/xml/QuickStartUnix/auqbg006.xml
+++ b/doc/xml/QuickStartUnix/auqbg006.xml
@@ -300,7 +300,7 @@
               examples. Once you have unpacked the distribution, 
               change directory as indicated.
 <programlisting>
-   # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/root.client/usr/vice/etc</emphasis>
+   # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/dest/root.client/usr/vice/etc</emphasis>
 </programlisting></para>
             </listitem>
 
@@ -435,7 +435,7 @@
 <programlisting>
    # <emphasis role="bold">cd /sbin/helpers</emphasis>
    # <emphasis role="bold">mv v3fshelper v3fshelper.noafs</emphasis>
-   # <emphasis role="bold">cp -p /tmp/afsdist/rs_aix42/root.server/etc/v3fshelper v3fshelper</emphasis>
+   # <emphasis role="bold">cp -p /tmp/afsdist/rs_aix42/dest/root.server/etc/v3fshelper v3fshelper</emphasis>
 </programlisting></para>
             </listitem>
 
@@ -507,7 +507,7 @@
               examples. Once you have unpacked the distribution, change 
               directory as indicated.
 <programlisting>
-   # <emphasis role="bold">cd /tmp/afsdist/hp_ux110/root.client</emphasis>
+   # <emphasis role="bold">cd /tmp/afsdist/hp_ux110/dest/root.client</emphasis>
 </programlisting></para>
             </listitem>
 
@@ -714,7 +714,7 @@
               <para>Copy the AFS-modified version of the <emphasis role="bold">fsck</emphasis> program (the <emphasis
               role="bold">vfsck</emphasis> binary) and related files from the distribution directory to the new AFS-specific command
               directory. <programlisting>
-   # <emphasis role="bold">cp -p /tmp/afsdist/hp_ux110/root.server/etc/*  .</emphasis>
+   # <emphasis role="bold">cp -p /tmp/afsdist/hp_ux110/dest/root.server/etc/*  .</emphasis>
 </programlisting></para>
             </listitem>
 
@@ -812,7 +812,7 @@
                     in all of the following examples. Once you have unpacked 
                     the distribution, change directory as indicated.
 <programlisting>
-   # <emphasis role="bold">cd /tmp/afsdist/sgi_65/root.client</emphasis>
+   # <emphasis role="bold">cd /tmp/afsdist/sgi_65/dest/root.client</emphasis>
 </programlisting></para>
                   </listitem>
 
@@ -1230,7 +1230,7 @@
               examples. Once you have unpacked the distribution,
               change directory as indicated.
 <programlisting>
-  # <emphasis role="bold">cd /tmp/afsdist/linux/root.client/usr/vice/etc</emphasis>
+  # <emphasis role="bold">cd /tmp/afsdist/linux/dest/root.client/usr/vice/etc</emphasis>
 </programlisting></para>
 
               <para>Copy the AFS kernel library files to the local <emphasis role="bold">/usr/vice/etc/modload</emphasis> directory.
@@ -1365,7 +1365,7 @@
               exmaples. Once you have unpacked the distribution, change directory
               as indicated. 
 <programlisting>
-   # <emphasis role="bold">cd  /tmp/afsdist/sun4x_56/root.client/usr/vice/etc</emphasis>
+   # <emphasis role="bold">cd  /tmp/afsdist/sun4x_56/dest/root.client/usr/vice/etc</emphasis>
 </programlisting></para>
             </listitem>
 
@@ -1381,6 +1381,18 @@
               <para>Copy the appropriate AFS kernel library file to the local file <emphasis
               role="bold">/kernel/fs/afs</emphasis>.</para>
 
+            <para>If the machine is running Solaris 11 on the x86_64 platform:</para>
+
+            <programlisting>
+   # <emphasis role="bold">cp -p modload/libafs64.o /kernel/drv/amd64/afs</emphasis>
+</programlisting>
+
+            <para>If the machine is running Solaris 10 on the x86_64 platform:</para>
+
+            <programlisting>
+   # <emphasis role="bold">cp -p modload/libafs64.o /kernel/fs/amd64/afs</emphasis>
+</programlisting>
+
               <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, its kernel supports NFS server
               functionality, and the <emphasis role="bold">nfsd</emphasis> process is running:</para>
 
@@ -1473,7 +1485,7 @@
             <listitem>
               <para>Copy the <emphasis role="bold">vfsck</emphasis> binary to the newly created directory, changing the name as you
               do so. <programlisting>
-   # <emphasis role="bold">cp  /cdrom/sun4x_56/root.server/etc/vfsck  fsck</emphasis>
+   # <emphasis role="bold">cp  /cdrom/sun4x_56/dest/root.server/etc/vfsck  fsck</emphasis>
 </programlisting></para>
             </listitem>
 
diff --git a/doc/xml/QuickStartUnix/auqbg007.xml b/doc/xml/QuickStartUnix/auqbg007.xml
index 5b27d9f..99e1845 100644
--- a/doc/xml/QuickStartUnix/auqbg007.xml
+++ b/doc/xml/QuickStartUnix/auqbg007.xml
@@ -260,7 +260,7 @@
             examples. Once you have unpacked the distribution, 
             change directory as indicated.
 <programlisting>
-   # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/root.client/usr/vice/etc</emphasis>
+   # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/dest/root.client/usr/vice/etc</emphasis>
 </programlisting></para>
           </listitem>
           <listitem>
@@ -427,7 +427,7 @@
             examples. Once you have unpacked the distribution, change directory 
             as indicated.
             <programlisting>
-   # <emphasis role="bold">cd /tmp/afsdist/hp_ux110/root.client</emphasis>
+   # <emphasis role="bold">cd /tmp/afsdist/hp_ux110/dest/root.client</emphasis>
 </programlisting></para>
           </listitem>
 
@@ -622,7 +622,7 @@
           examples. Once you have unpacked the distribution, change directory
           as indicated.
 <programlisting>
-   # <emphasis role="bold">cd  /tmp/afsdist/sgi_65/root.client</emphasis>
+   # <emphasis role="bold">cd  /tmp/afsdist/sgi_65/dest/root.client</emphasis>
 </programlisting></para>
         </listitem>
         <listitem>
@@ -1025,7 +1025,7 @@
             examples. Once you have unpacked the distribution,
             change directory as indicated.
 <programlisting>
-  # <emphasis role="bold">cd /tmp/afsdist/linux/root.client/usr/vice/etc</emphasis>
+  # <emphasis role="bold">cd /tmp/afsdist/linux/dest/root.client/usr/vice/etc</emphasis>
 </programlisting></para>
           </listitem>
 
@@ -1206,7 +1206,7 @@
             exmaples. Once you have unpacked the distribution, change directory
             as indicated. 
 <programlisting>
-   # <emphasis role="bold">cd  /tmp/afsdist/sun4x_56/root.client/usr/vice/etc</emphasis>
+   # <emphasis role="bold">cd  /tmp/afsdist/sun4x_56/dest/root.client/usr/vice/etc</emphasis>
 </programlisting></para>
           </listitem>          
 
@@ -1222,6 +1222,18 @@
             <para>Copy the appropriate AFS kernel library file to the local file <emphasis
             role="bold">/kernel/fs/afs</emphasis>.</para>
 
+            <para>If the machine is running Solaris 11 on the x86_64 platform:</para>
+
+            <programlisting>
+   # <emphasis role="bold">cp -p modload/libafs64.o /kernel/drv/amd64/afs</emphasis>
+</programlisting>
+
+            <para>If the machine is running Solaris 10 on the x86_64 platform:</para>
+
+            <programlisting>
+   # <emphasis role="bold">cp -p modload/libafs64.o /kernel/fs/amd64/afs</emphasis>
+</programlisting>
+
             <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, its kernel supports NFS server
             functionality, and the <emphasis role="bold">nfsd</emphasis> process is running:</para>
 
diff --git a/doc/xml/index.html b/doc/xml/index.html
index 6650236..37d1810 100644
--- a/doc/xml/index.html
+++ b/doc/xml/index.html
@@ -35,7 +35,7 @@
 <li>Quick Start Guides:
   <ul>
     <li><a href="QuickStartUnix/index.html">Unix</a></li>
-    <li><a href="http://wiki.openafs.org/AFSLore/WindowsEndUserQuickStartGuide/">Microsoft Windows</a></li>
+    <li><a href="http://wiki.openafs.org/WindowsEndUserQuickStartGuide/">Microsoft Windows</a></li>
   </ul>
 </li>
 <li><a href="UserGuide/index.html">User Guide</a></li>
diff --git a/src/JAVA/libjafs/README b/src/JAVA/libjafs/README
index 3560677..5b28c70 100644
--- a/src/JAVA/libjafs/README
+++ b/src/JAVA/libjafs/README
@@ -30,8 +30,8 @@ Current as of June 4, 2003
 
 JAFS is an open source API designed to allow Java programmers the ability
 to create applications for the administration or use of OpenAFS file systems.
-It works by accessing libadmin and libuafs (administrative and user-level 
-libraries that come with OpenAFS) through JNI.  It consists of a Java package 
+It works by accessing libadmin and libuafs (administrative and user-level
+libraries that come with OpenAFS) through JNI.  It consists of a Java package
 called org.openafs.jafs, and two shared libraries libjafsadm.so and libjafs.so.
 
 ---------------------------------------------------------------------------
@@ -40,16 +40,16 @@ called org.openafs.jafs, and two shared libraries libjafsadm.so and libjafs.so.
 *
 ---------------------------------------------------------------------------
 
-There is a version of JAFS that has been compiled on Red Hat Linux 7.3, 
+There is a version of JAFS that has been compiled on Red Hat Linux 7.3,
 and can be directly used without compilation.  It was compiled using
-OpenAFS 1.2.10a libraries (with a modified version of libjuafs.a).  It 
-consists of a JAR file (jafs-1.2.10a.jar) and two shared libraries 
-(libjafsadm.so and libjafs.so).  It was compiled using the 
---enable-transarc-paths on compilation (for use with the OpenAFS RPMs), 
+OpenAFS 1.2.10a libraries (with a modified version of libjuafs.a).  It
+consists of a JAR file (jafs-1.2.10a.jar) and two shared libraries
+(libjafsadm.so and libjafs.so).  It was compiled using the
+--enable-transarc-paths on compilation (for use with the OpenAFS RPMs),
 gcc 2.96, and Java Classic VM version 1.4.1_02.
 
 When you write Java code to use this API, import the
-org.openafs.jafs package. During compilation of your Java code, 
+org.openafs.jafs package. During compilation of your Java code,
 ensure one of the following conditions are met:
   - Use the "-classpath" option to javac to specify the jafs.jar file.
   - Change your $CLASSPATH environment variable to include the
@@ -58,14 +58,14 @@ ensure one of the following conditions are met:
 When running an application that uses JAFS, the shared libraries
 need to be found by Java's library loader.  The easiest way to
 accomplish this is to copy these files into the /usr/local/lib/ directory,
-or create symbolic links from that directory to the files.  Alternatively, 
+or create symbolic links from that directory to the files.  Alternatively,
 the directory containing the libraries can also be added to the
 LD_LIBRARY_PATH environment variable.
 
 You also need to have an OpenAFS client set up on your machine
 (preferably version 1.2.10a, but it should work for some past versions as well).
-You can obtain the OpenAFS client and view installation documentation at 
-http://www.openafs.org (the RPMs are easiest to use for Linux).  Also any 
+You can obtain the OpenAFS client and view installation documentation at
+http://www.openafs.org (the RPMs are easiest to use for Linux).  Also any
 cells you plan to access through the API must have entries in your
 client's CellServDB file (located in the /usr/vice/etc/ directory in most
 setups).
@@ -90,8 +90,8 @@ the JAFS API.
   for the source you download:
 
  ** APPLY THE APPROPRIATE PATCH
-  You can apply the appropriate JAFS patch with the following command, 
-  executed from the root directory of the download code 
+  You can apply the appropriate JAFS patch with the following command,
+  executed from the root directory of the download code
   (i.e. openafs-1.2.10a/):
 
       patch -p1 < xxx.diff
@@ -102,15 +102,15 @@ the JAFS API.
     OpenAFS 1.2.7 Source (openafs-1.2.7-src.tar.gz)
     OpenAFS 1.2.8 Source (openafs-1.2.8-src.tar.gz)
 
-      jafs-1.2.6-8.diff 
+      jafs-1.2.6-8.diff
 
   * OpenAFS 1.2.9 Source (openafs-1.2.9-src.tar.gz)
 
-      jafs-1.2.9.diff 
+      jafs-1.2.9.diff
 
   * OpenAFS 1.2.10a Source (openafs-1.2.10a-src.tar.gz)
 
-      jafs-1.2.10a.diff 
+      jafs-1.2.10a.diff
 
   * Daily Snapshot / CVS (example: openafs-snap-2003-05-21.tar.gz)
 
@@ -118,21 +118,21 @@ the JAFS API.
 
 
  ** RUN CONFIGURE
-  From the same directory, run the configure script as you normally would 
+  From the same directory, run the configure script as you normally would
   to compile OpenAFS, but run it with a java-home argument so the script can
   find your java distribution.  For example:
 
   ./configure [other options] --java-home=/usr/java/jdk
 
   NOTE: If the configure script is not within the root source directory,
-        then you will need to first run ./regen.sh to generate the 
+        then you will need to first run ./regen.sh to generate the
         configure script.  In this case you will need to manually
         modify the JAFS Makefile by setting the JAVA_HOME variable
         to your local system's JAVA_HOME. (i.e. /usr/java/jdk)
 
-  The configure script will ensure that this directory contains bin/ and lib/ 
-  subdirectories, and that there are /bin/javac and/bin/javah executables and 
-  an include/jni.h file.  If you don't supply a command line argument for the 
+  The configure script will ensure that this directory contains bin/ and lib/
+  subdirectories, and that there are /bin/javac and/bin/javah executables and
+  an include/jni.h file.  If you don't supply a command line argument for the
   java home, the script will look for it in environment variables: first in
   $JAVA_HOME and then in $JDK_HOME.  Also, note that if you have installed
   (or are planning to install) OpenAFS by using the RPMs for Linux, you
@@ -143,10 +143,10 @@ the JAFS API.
  ** RUN MAKE
   Finally, do a full build of OpenAFS by executing 'make' in the current
   directory.  After it finishes, you are ready to compile JAFS.  Execute
-  'make jafs' from that same directory.  Afterward, there will be 
-  libjafsadm.so and libjafs.so in the lib/ directory, and a jafs.jar in the 
-  jlib/ directory. These can be used according to the instructions in the 
-  'USE' section of this document. 
+  'make jafs' from that same directory.  Afterward, there will be
+  libjafsadm.so and libjafs.so in the lib/ directory, and a jafs.jar in the
+  jlib/ directory. These can be used according to the instructions in the
+  'USE' section of this document.
 
   For additional make options, please refer to the next section "MAKE OPTIONS"
 
@@ -157,7 +157,7 @@ the JAFS API.
 *
 ---------------------------------------------------------------------------
 
-Additional make options are available by running 'make' from the 
+Additional make options are available by running 'make' from the
 src/JAVA/libjafs directory; they are as follows:
 
 make            - Perform a full make of all Java classes, jar archive, and JNI
@@ -171,14 +171,14 @@ make clean_jar  - Delete the Java archive library (jlib/jafs.jar)
 make clean_libs - Delete both JNI shared libraries (lib/libjafs.so and
                   lib/libjafsadm.so)
 make install    - Performs a full make of all components and then installs all
-                  necessary components to your local system.  This option 
-                  prepares the required '/usr/afswsp/' directory for use by 
+                  necessary components to your local system.  This option
+                  prepares the required '/usr/afswsp/' directory for use by
                   the native library.
 make javadocs   - Generate Java API documents (in javadoc format).  Docs are
                   saved to src/JAVA/javadocs
 make jar        - Builds the Java archive library (containing all Java classes)
 make libjafs    - Builds the user-space library (used for ACL and file access)
-make libjafsadm - Builds the administrative library (used for all admin related 
+make libjafsadm - Builds the administrative library (used for all admin related
                   functions)
 
 ---------------------------------------------------------------------------
@@ -194,9 +194,9 @@ src/JAVA/libjafs:
   'buildinfo.pl', and a subdirectory 'etc'.
 
   acltest.c     - A test program that allows testing of the native libraries
-                  ACL calls without going through Java.  
+                  ACL calls without going through Java.
 
-                  *Usage information for this program is available by simply 
+                  *Usage information for this program is available by simply
                   invoking './acltest' without any parameters.
 
   buildinfo.pl  - A perl script that automatically updates the build information
@@ -205,23 +205,23 @@ src/JAVA/libjafs:
                   the native libraries (found in VersionInfo.h).  It may also
                   be used to programatically query for build information.
 
-                  *Usage information for this program is available by simply 
+                  *Usage information for this program is available by simply
                   invoking 'perl buildinfo.pl' without any parameters.
 
-  etc/          - A directory containing user-space configuration files. These 
-                  files are used for user-space initialization and cache 
+  etc/          - A directory containing user-space configuration files. These
+                  files are used for user-space initialization and cache
                   configuration and are copied to '/usr/afswsp/etc' if a
                   'make install' is issued.
 
 src/JAVA/classes:
 
-  Within the src/JAVA/classes directory you will find the root of the Java 
+  Within the src/JAVA/classes directory you will find the root of the Java
   package, the error message catalog file, and a test program:
 
   *.java        - Java classes that comprise the test program.
 
   adminTest     - A script that invokes the Java console-based test program.
-                  This program can be used to exercise all major API calls 
+                  This program can be used to exercise all major API calls
                   from Java, thus testing JNI libraries as well as Java code.
 
                   *Usage information for this program is available via its
@@ -253,7 +253,7 @@ src/JAVA/javadocs:
 ---------------------------------------------------------------------------
 
 If you'd like to edit the source code, you'll find the native C code in
-the src/JAVA/libjafs directory, and the Java code in the 
-src/JAVA/classes/org/openafs/jafs/ directory.  Please reference the 
+the src/JAVA/libjafs directory, and the Java code in the
+src/JAVA/classes/org/openafs/jafs/ directory.  Please reference the
 src/TechNotes-JavaAPI document for more information.
 
diff --git a/src/WINNT/netidmgr_plugin/extensions/sample/README b/src/WINNT/netidmgr_plugin/extensions/sample/README
index 64afcda..ef87a4a 100644
--- a/src/WINNT/netidmgr_plugin/extensions/sample/README
+++ b/src/WINNT/netidmgr_plugin/extensions/sample/README
@@ -168,14 +168,14 @@
 
 5.      BUILDING
 
-    The build process is fairly starightforward.  The source is set up
+    The build process is fairly straightforward.  The source is set up
     to build using 'nmake', a build tool distributed with the Platform
     SDK as well as with Visual Studio.
 
     1.  Open a command prompt with a suitable build environment.
 
         From a plain command prompt, you can set up a debug build
-        environment targetting Windows XP (32-bit) with:
+        environment targeting Windows XP (32-bit) with:
 
         > "%PROGRAMFILES%\Microsoft Platform SDK\SetEnv.Cmd" /XP32 /DEBUG
 
diff --git a/src/afs/FBSD/osi_vfsops.c b/src/afs/FBSD/osi_vfsops.c
index 3311e94..c4d35ba 100644
--- a/src/afs/FBSD/osi_vfsops.c
+++ b/src/afs/FBSD/osi_vfsops.c
@@ -185,7 +185,9 @@ afs_mount(struct mount *mp, struct thread *td)
 
 #ifdef AFS_FBSD60_ENV
 static int
-#ifdef AFS_FBSD80_ENV
+#if (__FreeBSD_version >= 900503 && __FreeBSD_version < 1000000) || __FreeBSD_version >= 1000004
+afs_cmount(struct mntarg *ma, void *data, uint64_t flags)
+#elif defined(AFS_FBSD80_ENV)
 afs_cmount(struct mntarg *ma, void *data, int flags)
 #else
 afs_cmount(struct mntarg *ma, void *data, int flags, struct thread *td)
diff --git a/src/afs/LINUX/osi_alloc.c b/src/afs/LINUX/osi_alloc.c
index 89a7bf8..fc74a2c 100644
--- a/src/afs/LINUX/osi_alloc.c
+++ b/src/afs/LINUX/osi_alloc.c
@@ -262,7 +262,8 @@ get_hash_stats(void)
     afs_lhash_stat(lh_mem_htab, &afs_linux_lsb);
 
     /* clear out the bucket stat vector */
-    for (i = 0; i < MAX_BUCKET_LEN; i++, afs_linux_hash_bucket_dist[i] = 0);
+    for (i = 0; i < MAX_BUCKET_LEN; i++)
+	afs_linux_hash_bucket_dist[i] = 0;
     cur_bucket = cur_bucket_len = 00;
 
     /* populate the bucket stat vector */
diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h
index e8bf003..b933560 100644
--- a/src/afs/LINUX/osi_compat.h
+++ b/src/afs/LINUX/osi_compat.h
@@ -473,10 +473,11 @@ afs_dentry_open(struct dentry *dp, struct vfsmount *mnt, int flags, const struct
     struct file *filp;
     path.mnt = mnt;
     path.dentry = dp;
+    /* note that dentry_open will path_get for us */
     filp = dentry_open(&path, flags, creds);
     return filp;
 #else
-    return dentry_open(dp, mntget(mnt), flags, creds);
+    return dentry_open(dget(dp), mntget(mnt), flags, creds);
 #endif
 }
 #endif
@@ -551,4 +552,17 @@ afs_truncate(struct inode *inode, int len)
     return code;
 }
 
+static inline struct proc_dir_entry *
+afs_proc_create(char *name, umode_t mode, struct proc_dir_entry *parent, struct file_operations *fops) {
+#if defined(HAVE_LINUX_PROC_CREATE)
+    return proc_create(name, mode, parent, fops);
+#else
+    struct proc_dir_entry *entry;
+    entry = create_proc_entry(name, mode, parent);
+    if (entry)
+	entry->proc_fops = fops;
+    return entry;
+#endif
+}
+
 #endif /* AFS_LINUX_OSI_COMPAT_H */
diff --git a/src/afs/LINUX/osi_cred.c b/src/afs/LINUX/osi_cred.c
index 20be594..f271321 100644
--- a/src/afs/LINUX/osi_cred.c
+++ b/src/afs/LINUX/osi_cred.c
@@ -117,7 +117,7 @@ crset(cred_t * cr)
     new_creds = prepare_creds();
     /* Drop the reference to group_info - we'll overwrite it in afs_copy_creds */
     put_group_info(new_creds->group_info);
-    afs_copy_creds(new_creds, current_cred());
+    afs_copy_creds(new_creds, cr);
 
     commit_creds(new_creds);
 #else
diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c
index 01cc42f..b83f736 100644
--- a/src/afs/LINUX/osi_file.c
+++ b/src/afs/LINUX/osi_file.c
@@ -56,14 +56,17 @@ afs_linux_raw_open(afs_dcache_id_t *ainode)
 
 #if defined(STRUCT_TASK_STRUCT_HAS_CRED)
     /* Use stashed credentials - prevent selinux/apparmor problems  */
-    filp = afs_dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, cache_creds);
+    filp = afs_dentry_open(dp, afs_cacheMnt, O_RDWR, cache_creds);
     if (IS_ERR(filp))
-	filp = afs_dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, current_cred());
+	filp = afs_dentry_open(dp, afs_cacheMnt, O_RDWR, current_cred());
 #else
-    filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR);
+    filp = dentry_open(dget(dp), mntget(afs_cacheMnt), O_RDWR);
 #endif
     if (IS_ERR(filp))
 	osi_Panic("Can't open file: %d\n", (int) PTR_ERR(filp));
+
+    dput(dp);
+
     return filp;
 }
 
diff --git a/src/afs/LINUX/osi_ioctl.c b/src/afs/LINUX/osi_ioctl.c
index 45e0fcd..82e907b 100644
--- a/src/afs/LINUX/osi_ioctl.c
+++ b/src/afs/LINUX/osi_ioctl.c
@@ -29,12 +29,13 @@
 #include <linux/ioctl32.h>
 #endif
 
-#include <linux/proc_fs.h>
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
 
+#include "osi_compat.h"
+
 extern struct proc_dir_entry *openafs_procfs;
 #if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
 static int ioctl32_done;
@@ -107,10 +108,10 @@ osi_ioctl_init(void)
 {
     struct proc_dir_entry *entry;
 
-    entry = create_proc_entry(PROC_SYSCALL_NAME, 0666, openafs_procfs);
-    entry->proc_fops = &afs_syscall_fops;
+    entry = afs_proc_create(PROC_SYSCALL_NAME, 0666, openafs_procfs, &afs_syscall_fops);
 #if defined(STRUCT_PROC_DIR_ENTRY_HAS_OWNER)
-    entry->owner = THIS_MODULE;
+    if (entry)
+	entry->owner = THIS_MODULE;
 #endif
 
 #if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
diff --git a/src/afs/LINUX/osi_proc.c b/src/afs/LINUX/osi_proc.c
index 974c0a7..5e3ac53 100644
--- a/src/afs/LINUX/osi_proc.c
+++ b/src/afs/LINUX/osi_proc.c
@@ -29,12 +29,13 @@
 # include <asm/ia32_unistd.h>
 #endif
 
-#include <linux/proc_fs.h>
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
 
+#include "osi_compat.h"
+
 struct proc_dir_entry *openafs_procfs;
 
 #ifdef HAVE_LINUX_SEQ_FILE_H
@@ -367,21 +368,18 @@ osi_proc_init(void)
     openafs_procfs = proc_mkdir(path, NULL);
 #endif
 #ifdef HAVE_LINUX_SEQ_FILE_H
-    entry = create_proc_entry("unixusers", 0, openafs_procfs);
-    if (entry) {
-	entry->proc_fops = &afs_unixuser_fops;
+    entry = afs_proc_create("unixusers", 0, openafs_procfs, &afs_unixuser_fops);
 # if defined(STRUCT_PROC_DIR_ENTRY_HAS_OWNER)
+    if (entry)
 	entry->owner = THIS_MODULE;
 # endif
-    }
-    entry = create_proc_entry(PROC_CELLSERVDB_NAME, 0, openafs_procfs);
-    if (entry)
-	entry->proc_fops = &afs_csdb_operations;
+    entry = afs_proc_create(PROC_CELLSERVDB_NAME, 0, openafs_procfs, &afs_csdb_operations);
 #else
     entry = create_proc_info_entry(PROC_CELLSERVDB_NAME, (S_IFREG|S_IRUGO), openafs_procfs, csdbproc_info);
 #endif
 #if defined(STRUCT_PROC_DIR_ENTRY_HAS_OWNER)
-    entry->owner = THIS_MODULE;
+    if (entry)
+	entry->owner = THIS_MODULE;
 #endif
 }
 
diff --git a/src/afs/LINUX/osi_vcache.c b/src/afs/LINUX/osi_vcache.c
index dc3685b..99aab91 100644
--- a/src/afs/LINUX/osi_vcache.c
+++ b/src/afs/LINUX/osi_vcache.c
@@ -19,10 +19,8 @@ osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep) {
 
     struct dentry *dentry;
     struct inode *inode = AFSTOV(avc);
-#if defined(D_ALIAS_IS_HLIST)
-    struct hlist_node *cur, *head, *list_end;
-#else
-    struct list_head *cur, *head, *list_end;
+#if defined(D_ALIAS_IS_HLIST) && !defined(HLIST_ITERATOR_NO_NODE)
+    struct hlist_node *p;
 #endif
 
     /* First, see if we can evict the inode from the dcache */
@@ -33,13 +31,9 @@ osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep) {
 
 #if defined(HAVE_DCACHE_LOCK)
         spin_lock(&dcache_lock);
-	head = &inode->i_dentry;
 
 restart:
-        cur = head;
-	while ((cur = cur->next) != head) {
-	    dentry = list_entry(cur, struct dentry, d_alias);
-
+	list_for_each_entry(dentry, &inode->i_dentry, d_alias) {
 	    if (d_unhashed(dentry))
 		continue;
 	    dget_locked(dentry);
@@ -57,23 +51,17 @@ restart:
 	spin_unlock(&dcache_lock);
 #else /* HAVE_DCACHE_LOCK */
 	spin_lock(&inode->i_lock);
-#if defined(D_ALIAS_IS_HLIST)
-	head = inode->i_dentry.first;
-	list_end = NULL;
-#else
-	head = &inode->i_dentry;
-	list_end = head;
-#endif
 
 restart:
-	cur = head;
-	while ((cur = cur->next) != list_end) {
 #if defined(D_ALIAS_IS_HLIST)
-	    dentry = hlist_entry(cur, struct dentry, d_alias);
+# if defined(HLIST_ITERATOR_NO_NODE)
+	hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) {
+# else
+	hlist_for_each_entry(dentry, p, &inode->i_dentry, d_alias) {
+# endif
 #else
-	    dentry = list_entry(cur, struct dentry, d_alias);
+	list_for_each_entry(dentry, &inode->i_dentry, d_alias) {
 #endif
-
 	    spin_lock(&dentry->d_lock);
 	    if (d_unhashed(dentry)) {
 		spin_unlock(&dentry->d_lock);
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 1366b96..fa0ad91 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -32,6 +32,7 @@
 #include <linux/pagemap.h>
 #include <linux/writeback.h>
 #include <linux/pagevec.h>
+#include <linux/aio.h>
 #include "afs/lock.h"
 #include "afs/afs_bypasscache.h"
 
@@ -96,6 +97,43 @@ afs_linux_VerifyVCache(struct vcache *avc, cred_t **retcred) {
     return afs_convert_code(code);
 }
 
+#ifdef HAVE_LINUX_GENERIC_FILE_AIO_READ
+# ifdef LINUX_HAS_NONVECTOR_AIO
+static ssize_t
+afs_linux_aio_read(struct kiocb *iocb, char __user *buf, size_t bufsize,
+                   loff_t pos)
+# else
+static ssize_t
+afs_linux_aio_read(struct kiocb *iocb, const struct iovec *buf,
+                   unsigned long bufsize, loff_t pos)
+# endif
+{
+    struct file *fp = iocb->ki_filp;
+    ssize_t code = 0;
+    struct vcache *vcp = VTOAFS(fp->f_dentry->d_inode);
+
+    AFS_GLOCK();
+    afs_Trace4(afs_iclSetp, CM_TRACE_AIOREADOP, ICL_TYPE_POINTER, vcp,
+	       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(pos), ICL_TYPE_INT32,
+               (afs_int32)bufsize, ICL_TYPE_INT32, 99999);
+    code = afs_linux_VerifyVCache(vcp, NULL);
+
+    if (code == 0) {
+	/* Linux's FlushPages implementation doesn't ever use credp,
+	 * so we optimise by not using it */
+	osi_FlushPages(vcp, NULL);	/* ensure stale pages are gone */
+	AFS_GUNLOCK();
+	code = generic_file_aio_read(iocb, buf, bufsize, pos);
+	AFS_GLOCK();
+    }
+
+    afs_Trace4(afs_iclSetp, CM_TRACE_AIOREADOP, ICL_TYPE_POINTER, vcp,
+	       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(pos), ICL_TYPE_INT32,
+               (afs_int32)bufsize, ICL_TYPE_INT32, code);
+    AFS_GUNLOCK();
+    return code;
+}
+#else
 static ssize_t
 afs_linux_read(struct file *fp, char *buf, size_t count, loff_t * offp)
 {
@@ -123,12 +161,64 @@ afs_linux_read(struct file *fp, char *buf, size_t count, loff_t * offp)
     AFS_GUNLOCK();
     return code;
 }
+#endif
 
 
-/* Now we have integrated VM for writes as well as reads. generic_file_write
- * also takes care of re-positioning the pointer if file is open in append
+/* Now we have integrated VM for writes as well as reads. the generic write operations
+ * also take care of re-positioning the pointer if file is open in append
  * mode. Call fake open/close to ensure we do writes of core dumps.
  */
+#ifdef HAVE_LINUX_GENERIC_FILE_AIO_READ
+# ifdef LINUX_HAS_NONVECTOR_AIO
+static ssize_t
+afs_linux_aio_write(struct kiocb *iocb, const char __user *buf, size_t bufsize,
+                    loff_t pos)
+# else
+static ssize_t
+afs_linux_aio_write(struct kiocb *iocb, const struct iovec *buf,
+                    unsigned long bufsize, loff_t pos)
+# endif
+{
+    ssize_t code = 0;
+    struct vcache *vcp = VTOAFS(iocb->ki_filp->f_dentry->d_inode);
+    cred_t *credp;
+
+    AFS_GLOCK();
+
+    afs_Trace4(afs_iclSetp, CM_TRACE_AIOWRITEOP, ICL_TYPE_POINTER, vcp,
+	       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(pos), ICL_TYPE_INT32,
+               (afs_int32)bufsize, ICL_TYPE_INT32,
+	       (iocb->ki_filp->f_flags & O_APPEND) ? 99998 : 99999);
+
+    code = afs_linux_VerifyVCache(vcp, &credp);
+
+    ObtainWriteLock(&vcp->lock, 529);
+    afs_FakeOpen(vcp);
+    ReleaseWriteLock(&vcp->lock);
+    if (code == 0) {
+	    AFS_GUNLOCK();
+	    code = generic_file_aio_write(iocb, buf, bufsize, pos);
+	    AFS_GLOCK();
+    }
+
+    ObtainWriteLock(&vcp->lock, 530);
+
+    if (vcp->execsOrWriters == 1 && !credp)
+      credp = crref();
+
+    afs_FakeClose(vcp, credp);
+    ReleaseWriteLock(&vcp->lock);
+
+    afs_Trace4(afs_iclSetp, CM_TRACE_AIOWRITEOP, ICL_TYPE_POINTER, vcp,
+	       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(pos), ICL_TYPE_INT32,
+               (afs_int32)bufsize, ICL_TYPE_INT32, code);
+
+    if (credp)
+      crfree(credp);
+    AFS_GUNLOCK();
+    return code;
+}
+#else
 static ssize_t
 afs_linux_write(struct file *fp, const char *buf, size_t count, loff_t * offp)
 {
@@ -170,6 +260,7 @@ afs_linux_write(struct file *fp, const char *buf, size_t count, loff_t * offp)
     AFS_GUNLOCK();
     return code;
 }
+#endif
 
 extern int BlobScan(struct dcache * afile, afs_int32 ablob);
 
@@ -663,11 +754,12 @@ struct file_operations afs_dir_fops = {
 };
 
 struct file_operations afs_file_fops = {
+#ifdef HAVE_LINUX_GENERIC_FILE_AIO_READ
+  .aio_read =	afs_linux_aio_read,
+  .aio_write =	afs_linux_aio_write,
+#else
   .read =	afs_linux_read,
   .write =	afs_linux_write,
-#ifdef HAVE_LINUX_GENERIC_FILE_AIO_READ
-  .aio_read =	generic_file_aio_read,
-  .aio_write =	generic_file_aio_write,
 #endif
 #ifdef HAVE_UNLOCKED_IOCTL
   .unlocked_ioctl = afs_unlocked_xioctl,
@@ -701,7 +793,7 @@ canonical_dentry(struct inode *ip)
 {
     struct vcache *vcp = VTOAFS(ip);
     struct dentry *first = NULL, *ret = NULL, *cur;
-#if defined(D_ALIAS_IS_HLIST)
+#if defined(D_ALIAS_IS_HLIST) && !defined(HLIST_ITERATOR_NO_NODE)
     struct hlist_node *p;
 #endif
 
@@ -724,7 +816,11 @@ canonical_dentry(struct inode *ip)
 # endif
 
 #if defined(D_ALIAS_IS_HLIST)
+# if defined(HLIST_ITERATOR_NO_NODE)
+    hlist_for_each_entry(cur, &ip->i_dentry, d_alias) {
+# else
     hlist_for_each_entry(cur, p, &ip->i_dentry, d_alias) {
+# endif
 #else
     list_for_each_entry_reverse(cur, &ip->i_dentry, d_alias) {
 #endif
diff --git a/src/afs/LINUX24/osi_alloc.c b/src/afs/LINUX24/osi_alloc.c
index d4f91cb..62981cf 100644
--- a/src/afs/LINUX24/osi_alloc.c
+++ b/src/afs/LINUX24/osi_alloc.c
@@ -275,7 +275,8 @@ get_hash_stats(void)
     afs_lhash_stat(lh_mem_htab, &afs_linux_lsb);
 
     /* clear out the bucket stat vector */
-    for (i = 0; i < MAX_BUCKET_LEN; i++, afs_linux_hash_bucket_dist[i] = 0);
+    for (i = 0; i < MAX_BUCKET_LEN; i++)
+	afs_linux_hash_bucket_dist[i] = 0;
     cur_bucket = cur_bucket_len = 00;
 
     /* populate the bucket stat vector */
diff --git a/src/afs/OBSD/osi_machdep.h b/src/afs/OBSD/osi_machdep.h
index c0599f2..0b1e901 100644
--- a/src/afs/OBSD/osi_machdep.h
+++ b/src/afs/OBSD/osi_machdep.h
@@ -230,11 +230,16 @@ extern struct lock afs_global_lock;
     } while (0)
 
 /* vnodes */
+#if defined(AFS_OBSD49_ENV)
+extern struct vops afs_vops;
+#define IsAfsVnode(v)      ((v)->v_op == &afs_vops)
+#else
 extern int (**afs_vnodeop_p) ();
+#define IsAfsVnode(v)      ((v)->v_op == afs_vnodeop_p)
+#endif
 #define vType(vc)               AFSTOV(vc)->v_type
 #define vSetVfsp(vc, vfsp)      AFSTOV(vc)->v_mount = (vfsp)
 #define vSetType(vc, type)      AFSTOV(vc)->v_type = (type)
-#define IsAfsVnode(v)      ((v)->v_op == afs_vnodeop_p)
 #define SetAfsVnode(v)     /* nothing; done in getnewvnode() */
 
 #define osi_procname(procname, size) strncpy(procname, curproc->p_comm, size)
diff --git a/src/afs/OBSD/osi_vfsops.c b/src/afs/OBSD/osi_vfsops.c
index d4ab1f6..3db75e2 100644
--- a/src/afs/OBSD/osi_vfsops.c
+++ b/src/afs/OBSD/osi_vfsops.c
@@ -245,8 +245,13 @@ afs_mount(mp, path, data, ndp, p)
     mp->osi_vfs_fsid.val[0] = AFS_VFSMAGIC;	/* magic */
     mp->osi_vfs_fsid.val[1] = (int)AFS_VFSFSID;
 
+#if defined(AFS_OBSD53_ENV)
+    bzero(mp->mnt_stat.f_mntonname, MNAMELEN);
+    strlcpy(mp->mnt_stat.f_mntonname, path, MNAMELEN);
+#else
     (void)copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
     bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size);
+#endif
     bzero(mp->mnt_stat.f_mntfromname, MNAMELEN);
     strcpy(mp->mnt_stat.f_mntfromname, "AFS");
     /* null terminated string "AFS" will fit, just leave it be. */
@@ -309,10 +314,18 @@ afs_badcall(struct proc *p, void *xx, register_t * yy)
     return ENOSYS;
 }
 
+#if defined(AFS_OBSD49_ENV)
+extern struct vops afs_vops;
+#endif
+
 void
 afs_obsd_getnewvnode(struct vcache *tvc)
 {
+#if defined(AFS_OBSD49_ENV)
+    while (getnewvnode(VT_AFS, afs_globalVFS, &afs_vops, &tvc->v)) {
+#else
     while (getnewvnode(VT_AFS, afs_globalVFS, afs_vnodeop_p, &tvc->v)) {
+#endif
 	/* no vnodes available, force an alloc (limits be damned)! */
 	desiredvnodes++;
     }
@@ -441,8 +454,10 @@ afs_vfs_load(struct lkm_table *lkmtp, int cmd)
 {
     extern char *memname[];
 
+#if ! defined(AFS_OBSD49_ENV)
     vfs_opv_init_explicit(&afs_vnodeop_opv_desc);
     vfs_opv_init_default(&afs_vnodeop_opv_desc);
+#endif
     if (memname[M_AFSGENERIC] == NULL)
 	memname[M_AFSGENERIC] = afsgenmem;
     if (memname[M_AFSFID] == NULL)
diff --git a/src/afs/OBSD/osi_vnodeops.c b/src/afs/OBSD/osi_vnodeops.c
index 317cb52..9bf045d 100644
--- a/src/afs/OBSD/osi_vnodeops.c
+++ b/src/afs/OBSD/osi_vnodeops.c
@@ -151,6 +151,46 @@ int afs_obsd_advlock(void *);
 	((int (*) __P((void *)))eopnotsupp)
 #define afs_obsd_reallocblks afs_obsd_opnotsupp
 
+#if defined(AFS_OBSD49_ENV)
+
+struct vops afs_vops = {
+	.vop_lookup	= afs_obsd_lookup,
+	.vop_create	= afs_obsd_create,
+	.vop_mknod	= afs_obsd_mknod,
+	.vop_open	= afs_obsd_open,
+	.vop_close	= afs_obsd_close,
+	.vop_access	= afs_obsd_access,
+	.vop_getattr	= afs_obsd_getattr,
+	.vop_setattr	= afs_obsd_setattr,
+	.vop_read	= afs_obsd_read,
+	.vop_write	= afs_obsd_write,
+	.vop_ioctl	= afs_obsd_ioctl,
+	.vop_poll	= afs_obsd_select,
+	.vop_fsync	= afs_obsd_fsync,
+	.vop_remove	= afs_obsd_remove,
+	.vop_link	= afs_obsd_link,
+	.vop_rename	= afs_obsd_rename,
+	.vop_mkdir	= afs_obsd_mkdir,
+	.vop_rmdir	= afs_obsd_rmdir,
+	.vop_symlink	= afs_obsd_symlink,
+	.vop_readdir	= afs_obsd_readdir,
+	.vop_readlink	= afs_obsd_readlink,
+	.vop_abortop	= vop_generic_abortop,
+	.vop_inactive	= afs_obsd_inactive,
+	.vop_reclaim	= afs_obsd_reclaim,
+	.vop_lock	= afs_obsd_lock,
+	.vop_unlock	= afs_obsd_unlock,
+	.vop_bmap	= afs_obsd_bmap,
+	.vop_strategy	= afs_obsd_strategy,
+	.vop_print	= afs_obsd_print,
+	.vop_islocked	= afs_obsd_islocked,
+	.vop_pathconf	= afs_obsd_pathconf,
+	.vop_advlock	= afs_obsd_advlock,
+	.vop_bwrite	= vop_generic_bwrite,
+};
+
+#else
+
 /* Global vfs data structures for AFS. */
 int (**afs_vnodeop_p) __P((void *));
 struct vnodeopv_entry_desc afs_vnodeop_entries[] = {
@@ -202,6 +242,8 @@ struct vnodeopv_entry_desc afs_vnodeop_entries[] = {
 struct vnodeopv_desc afs_vnodeop_opv_desc =
     { &afs_vnodeop_p, afs_vnodeop_entries };
 
+#endif
+
 #define GETNAME()	\
     struct componentname *cnp = ap->a_cnp; \
     char *name; \
@@ -678,7 +720,11 @@ afs_obsd_rename(void *v)
 	if ((fcnp->cn_flags & SAVESTART) == 0)
 	    panic("afs_rename: lost from startdir");
 	fcnp->cn_nameiop = DELETE;
+#if defined(AFS_OBSD49_ENV)
+	(void)vfs_relookup(fdvp, &fvp, fcnp);
+#else
 	(void)relookup(fdvp, &fvp, fcnp);
+#endif
 	return (VOP_REMOVE(fdvp, fvp, fcnp));
     }
 
diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c
index d076a0d..5d96f75 100644
--- a/src/afs/VNOPS/afs_vnop_lookup.c
+++ b/src/afs/VNOPS/afs_vnop_lookup.c
@@ -1930,7 +1930,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr
 	     * volume) rather than the vc of the mount point itself.  We can
 	     * still find the mount point's vc in the vcache by its fid. */
 #endif /* UKERNEL */
-	    if (!hit && force_eval) {
+	    if (!hit && (force_eval || tvc->mvstat != 1)) {
 		osi_dnlc_enter(adp, aname, tvc, &versionNo);
 	    } else {
 #ifdef AFS_LINUX20_ENV
diff --git a/src/afs/VNOPS/afs_vnop_open.c b/src/afs/VNOPS/afs_vnop_open.c
index d5d54ce..b6532c2 100644
--- a/src/afs/VNOPS/afs_vnop_open.c
+++ b/src/afs/VNOPS/afs_vnop_open.c
@@ -170,28 +170,29 @@ afs_open(struct vcache **avcp, afs_int32 aflags, afs_ucred_t *acred)
 	afs_size_t offset, len;
 
 	tdc = afs_GetDCache(tvc, 0, &treq, &offset, &len, 1);
-
-	ObtainSharedLock(&tdc->mflock, 865);
-	if (!(tdc->mflags & DFFetchReq)) {
-	    struct brequest *bp;
-
-	    /* start the daemon (may already be running, however) */
-	    UpgradeSToWLock(&tdc->mflock, 666);
-	    tdc->mflags |= DFFetchReq;  /* guaranteed to be cleared by BKG or 
-					   GetDCache */
-	    /* last parm (1) tells bkg daemon to do an afs_PutDCache when it 
-	       is done, since we don't want to wait for it to finish before 
-	       doing so ourselves.
-	    */
-	    bp = afs_BQueue(BOP_FETCH, tvc, B_DONTWAIT, 0, acred,
-			    (afs_size_t) 0, (afs_size_t) 1, tdc,
-			    (void *)0, (void *)0);
-	    if (!bp) {
-		tdc->mflags &= ~DFFetchReq;
+	if (tdc) {
+	    ObtainSharedLock(&tdc->mflock, 865);
+	    if (!(tdc->mflags & DFFetchReq)) {
+		struct brequest *bp;
+
+		/* start the daemon (may already be running, however) */
+		UpgradeSToWLock(&tdc->mflock, 666);
+		tdc->mflags |= DFFetchReq;  /* guaranteed to be cleared by BKG or
+					       GetDCache */
+		/* last parm (1) tells bkg daemon to do an afs_PutDCache when it
+		   is done, since we don't want to wait for it to finish before
+		   doing so ourselves.
+		*/
+		bp = afs_BQueue(BOP_FETCH, tvc, B_DONTWAIT, 0, acred,
+				(afs_size_t) 0, (afs_size_t) 1, tdc,
+				(void *)0, (void *)0);
+		if (!bp) {
+		    tdc->mflags &= ~DFFetchReq;
+		}
+		ReleaseWriteLock(&tdc->mflock);
+	    } else {
+		ReleaseSharedLock(&tdc->mflock);
 	    }
-	    ReleaseWriteLock(&tdc->mflock);
-	} else {
-	    ReleaseSharedLock(&tdc->mflock);
 	}
     }	
   done:
diff --git a/src/afs/afs_analyze.c b/src/afs/afs_analyze.c
index f5844f9..76a8156 100644
--- a/src/afs/afs_analyze.c
+++ b/src/afs/afs_analyze.c
@@ -850,7 +850,7 @@ afs_Analyze(struct afs_conn *aconn, struct rx_connection *rxconn,
 	 * retry in case there is another server.  However, if we find
 	 * no connection (aconn == 0) we set the networkError flag.
 	 */
-	afs_MarkServerUpOrDown(sa, SRVR_ISDOWN);
+	afs_ServerDown(sa, acode);
 	if (aerrP)
 	    (aerrP->err_Server)++;
 	VSleep(1);		/* Just a hack for desperate times. */
diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c
index 875256b..cd96464 100644
--- a/src/afs/afs_dcache.c
+++ b/src/afs/afs_dcache.c
@@ -1,6 +1,6 @@
 /*
  * Copyright 2000, International Business Machines Corporation and others.
- *$All Rights Reserved.
+ * All Rights Reserved.
  *
  * This software has been released under the terms of the IBM Public
  * License.  For details, see the LICENSE file in the top-level source
@@ -2800,7 +2800,15 @@ afs_UFSGetDSlot(afs_int32 aslot, int indexvalid, int datavalid)
 	          (int)aslot, off);
     }
 
-    if (!entryok || !datavalid) {
+    if (indexvalid && !datavalid) {
+	/* we know that the given dslot does exist, but the data in it is not
+	 * valid. this only occurs when we pull a dslot from the free or
+	 * discard list, so be sure not to re-use the data; force invalidation.
+	 */
+	entryok = 0;
+    }
+
+    if (!entryok) {
 	tdc->f.fid.Cell = 0;
 	tdc->f.fid.Fid.Volume = 0;
 	tdc->f.chunk = -1;
diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c
index 6746f1b..c05389c 100644
--- a/src/afs/afs_fetchstore.c
+++ b/src/afs/afs_fetchstore.c
@@ -463,6 +463,7 @@ afs_CacheStoreDCaches(struct vcache *avc, struct dcache **dclist,
 {
     int *shouldwake = NULL;
     unsigned int i;
+    int stored = 0;
     afs_int32 code = 0;
     afs_size_t bytesXferred;
 
@@ -473,7 +474,6 @@ afs_CacheStoreDCaches(struct vcache *avc, struct dcache **dclist,
     XSTATS_DECLS;
 
     for (i = 0; i < nchunks && !code; i++) {
-	int stored = 0;
 	struct dcache *tdc = dclist[i];
 	afs_int32 size = tdc->f.chunkBytes;
 	if (!tdc) {
diff --git a/src/afs/afs_icl.c b/src/afs/afs_icl.c
index 759342b..63fa1ea 100644
--- a/src/afs/afs_icl.c
+++ b/src/afs/afs_icl.c
@@ -83,14 +83,17 @@ afs_icl_InitLogs(void)
 
     /* initialize the ICL system */
     code = afs_icl_CreateLog("cmfx", 60 * 1024, &logp);
-    if (code == 0)
-	code =
-	    afs_icl_CreateSetWithFlags("cm", logp, NULL,
-				       ICL_CRSET_FLAG_DEFAULT_OFF,
-				       &afs_iclSetp);
-    code =
-	afs_icl_CreateSet("cmlongterm", logp, NULL,
-			  &afs_iclLongTermSetp);
+    if (code)
+	return code;
+
+    code = afs_icl_CreateSetWithFlags("cm", logp, NULL,
+				      ICL_CRSET_FLAG_DEFAULT_OFF,
+				      &afs_iclSetp);
+    if (code)
+	return code;
+
+    code = afs_icl_CreateSet("cmlongterm", logp, NULL,
+			     &afs_iclLongTermSetp);
     return code;
 }
 
@@ -237,7 +240,7 @@ Afscall_icl(long opcode, long p1, long p2, long p3, long p4, long *retval)
 	setp = afs_icl_FindSet(tname);
 	if (!setp)
 	    return ENOENT;
-	if (p2 > ICL_LOGSPERSET)
+	if (p2 >= ICL_LOGSPERSET)
 	    return EINVAL;
 	if (!(tlp = setp->logs[p2]))
 	    return EBADF;
diff --git a/src/afs/afs_osidnlc.c b/src/afs/afs_osidnlc.c
index 0309e9a..6deb89c 100644
--- a/src/afs/afs_osidnlc.c
+++ b/src/afs/afs_osidnlc.c
@@ -81,6 +81,9 @@ GetMeAnEntry(void)
 	    break;
     }
 
+    if (nameptr >= NHSIZE)
+	nameptr = 0;
+
     TRACE(ScavengeEntryT, nameptr);
     tnc = nameHash[nameptr];
     if (!tnc)			/* May want to consider changing this to return 0 */
diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c
index 98919a3..e941d26 100644
--- a/src/afs/afs_pioctl.c
+++ b/src/afs/afs_pioctl.c
@@ -4880,7 +4880,7 @@ DECL_PIOCTL(PPrefetchFromTape)
     struct vcache *tvc;
     struct rx_connection *rxconn;
 
-    AFS_STATCNT(PSetAcl);
+    AFS_STATCNT(PPrefetchFromTape);
     if (!avc)
 	return EINVAL;
 
diff --git a/src/afs/afs_stats.h b/src/afs/afs_stats.h
index 6179d42..3dcee64 100644
--- a/src/afs/afs_stats.h
+++ b/src/afs/afs_stats.h
@@ -657,6 +657,8 @@ struct afs_CMCallStats {
     afs_int32 C_SRXAFSCB_GetCellByNum;	/* afs_callback.c */
     afs_int32 C_BPrefetchNoCache;	/* afs_daemons.c */
     afs_int32 C_afs_ReadNoCache;	/* osi_vnodeops.c */
+    afs_int32 C_PSetTokens2;	/* afs_pioctl.c */
+    afs_int32 C_PPrefetchFromTape;	/* afs_pioctl.c */
 };
 
 struct afs_CMMeanStats {
@@ -865,7 +867,7 @@ struct afs_stats_CMPerf {
 #define AFS_STATS_FS_RPCIDX_XLOOKUP             28
 #define AFS_STATS_FS_RPCIDX_RESIDENCYRPCS       29
 
-#define AFS_STATS_NUM_FS_RPC_OPS		29
+#define AFS_STATS_NUM_FS_RPC_OPS		30
 
 #define AFS_STATS_FS_RPCIDXES_ISWRITE(X)        (((X > AFS_STATS_FS_RPCIDX_FETCHSTATUS) && (X < AFS_STATS_FS_RPCIDX_GETSTATISTICS)) || (X == AFS_STATS_FS_RPCIDX_SETVOLUMESTATUS))
 #define AFS_STATS_FS_RPCIDXES_WRITE_RETRIABLE(X) ((X >= AFS_STATS_FS_RPCIDX_STOREDATA) && (X <= AFS_STATS_FS_RPCIDX_STORESTATUS))
diff --git a/src/afs/afs_trace.et b/src/afs/afs_trace.et
index 5e9dbd3..c86ae15 100644
--- a/src/afs/afs_trace.et
+++ b/src/afs/afs_trace.et
@@ -173,5 +173,7 @@ error_table 2 ZCM
 	ec	CM_TRACE_WRITEFAILED, "osi_Write failed len %ld resid %ld err %ld"
 	ec	CM_TRACE_ADJUSTSIZE2, "AdjustSize dc = 0x%lx, chunkBytes = 0x%x used = %ld, diff = %ld"
 	ec 	CM_TRACE_AFSDB, "AFSDB lookup %s returned %d"
+	ec	CM_TRACE_AIOREADOP, "Iaioread ip x%lx pos (0x%x, 0x%x) segs 0x%x code %x"
+	ec	CM_TRACE_AIOWRITEOP, "Iaiowrite ip x%lx pos (0x%x, 0x%x) segs 0x%x code %x"
 end
 
diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c
index 6f0bf50..96cb588 100644
--- a/src/afs/afs_vcache.c
+++ b/src/afs/afs_vcache.c
@@ -674,7 +674,9 @@ afs_ShakeLooseVCaches(afs_int32 anumber)
 	uq = QPrev(tq);
 	if (tvc->f.states & CVFlushed) {
 	    refpanic("CVFlushed on VLRU");
-	} else if (!afsd_dynamic_vcaches && i++ > limit) {
+	} else if (i++ > limit) {
+	    afs_warn("afs_ShakeLooseVCaches: i %d limit %d afs_vcount %d afs_maxvcount %d\n",
+	             (int)i, limit, (int)afs_vcount, (int)afs_maxvcount);
 	    refpanic("Found too many AFS vnodes on VLRU (VLRU cycle?)");
 	} else if (QNext(uq) != tq) {
 	    refpanic("VLRU inconsistent");
diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h
index f7abc2e..5840227 100644
--- a/src/afs/sysincludes.h
+++ b/src/afs/sysincludes.h
@@ -160,6 +160,7 @@ struct xfs_inode_info {
 # include <linux/sched.h>
 # include <linux/mm.h>
 # include <linux/slab.h>
+# include <linux/proc_fs.h>
 # include <linux/string.h>
 # if defined(HAVE_LINUX_SEMAPHORE_H)
 #  include <linux/semaphore.h>
diff --git a/src/afsd/Makefile.in b/src/afsd/Makefile.in
index de4961e..4823086 100644
--- a/src/afsd/Makefile.in
+++ b/src/afsd/Makefile.in
@@ -34,7 +34,7 @@ afsd: afsd.o afsd_kernel.o $(AFSLIBS) $(AFSD_LIBS)
 	${CC} ${CFLAGS} -o afsd afsd.o afsd_kernel.o $(NON_SHARED) $(LDFLAGS) $(AFSD_LDFLAGS) $(AFSLIBS) ${XLIBS} ${AFSD_LIBS}
 
 afsd.fuse: afsd_fuse.o $(UAFSLIBS) $(AFSD_LIBS)
-	${CC} ${UAFS_CFLAGS} -o afsd.fuse afsd_fuse.o $(NON_SHARED) $(LDFLAGS) $(AFSD_LDFLAGS) $(UAFSLIBS) ${UAFS_XLIBS} ${AFSD_LIBS}
+	${CC} ${UAFS_CFLAGS} -o afsd.fuse afsd_fuse.o $(NON_SHARED) $(LDFLAGS) $(AFSD_LDFLAGS) $(UAFSLIBS) $(MT_LIBS) ${UAFS_XLIBS} ${AFSD_LIBS}
 
 vsys: vsys.o
 	${CC} ${CFLAGS} -o vsys vsys.o ${TOP_LIBDIR}/libsys.a $(LDFLAGS) ${XLIBS}
diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c
index 603551f..800fefc 100644
--- a/src/afsd/afsd.c
+++ b/src/afsd/afsd.c
@@ -228,11 +228,6 @@ struct in_addr_42 {
 	} S_un_w;
 	afs_uint32 S_addr;
     } S_un;
-#define	s_host	S_un.S_un_b.s_b2	/* host on imp */
-#define	s_net	S_un.S_un_b.s_b1	/* network */
-#define	s_imp	S_un.S_un_w.s_w2	/* imp */
-#define	s_impno	S_un.S_un_b.s_b4	/* imp # */
-#define	s_lh	S_un.S_un_b.s_b3	/* logical host */
 };
 
 #define	mPrintIPAddr(ipaddr)  printf("[%d.%d.%d.%d] ",		\
@@ -1909,6 +1904,12 @@ mainproc(struct cmd_syndesc *as, void *arock)
 	/* -dynroot-sparse */
 	enable_dynroot = 2;
     }
+
+    /* parse cacheinfo file if this is a diskcache */
+    if (ParseCacheInfoFile()) {
+	exit(1);
+    }
+
     return 0;
 }
 
@@ -1945,11 +1946,6 @@ afsd_run(void)
 	    printf("%s: My home cell is '%s'\n", rn, LclCellName);
     }
 
-    /* parse cacheinfo file if this is a diskcache */
-    if (ParseCacheInfoFile()) {
-	exit(1);
-    }
-
     if (!enable_nomount) {
 	if (afsd_check_mount(rn, afsd_cacheMountDir)) {
 	    return -1;
@@ -2336,7 +2332,7 @@ afsd_run(void)
     if (enable_fakestat) {
 	if (afsd_verbose)
 	    printf("%s: Enabling fakestat support in kernel%s.\n", rn,
-		   (enable_fakestat==2)?" for all mountpoints."
+		   (enable_fakestat==1)?" for all mountpoints."
 		   :" for crosscell mountpoints");
 	code = afsd_call_syscall(AFSOP_SET_FAKESTAT, enable_fakestat);
 	if (code)
diff --git a/src/afsweb/README b/src/afsweb/README
index 54f9706..1444012 100644
--- a/src/afsweb/README
+++ b/src/afsweb/README
@@ -12,68 +12,68 @@ Release Notes
 
 I. Introduction
 
-The AFS Web Security Pack is an extension available for selected Web servers 
-that enables system administrators to provide secure access via a 
-Web browser to documents stored in the AFS filespace. This document 
+The AFS Web Security Pack is an extension available for selected Web servers
+that enables system administrators to provide secure access via a
+Web browser to documents stored in the AFS filespace. This document
 provides information specific to this release of the AFS Web Security Pack.
 
-Note: Due the long filenames and file extensions used for the AFS Web 
-Secure distribution files, download of the AFS Web Secure product to 
-a PC sometimes results in incorrect filenames. Note that all AFS Web 
-Secure distribution files are g-zipped tar files, even if the *.tar.gz 
-file extension is lost during the download process. 
+Note: Due the long filenames and file extensions used for the AFS Web
+Secure distribution files, download of the AFS Web Secure product to
+a PC sometimes results in incorrect filenames. Note that all AFS Web
+Secure distribution files are g-zipped tar files, even if the *.tar.gz
+file extension is lost during the download process.
 
 II. Installation Prerequisites
 
-Note: If you have installed a previous version of the AFS Web Security Pack, 
-you must first remove the previous version, including any modifications made 
-to your Apache Web server configuration and runtime configuration files 
+Note: If you have installed a previous version of the AFS Web Security Pack,
+you must first remove the previous version, including any modifications made
+to your Apache Web server configuration and runtime configuration files
 before installing this version of the product.
 
-Your system must meet the following software and disk space requirements 
+Your system must meet the following software and disk space requirements
 to install this version of the AFS Web Security Pack.
 
-Operating system:	 Solaris 2.5.1, AIX 4.2x, AIX 4.3, or AIX 4.3.1 
-Web server:		 Apache 1.2.6 or Apache 1.3.1 
-AFS (client):		 AFS Client 3.4a 
-Disk Space:		 650 KB 
+Operating system:	 Solaris 2.5.1, AIX 4.2x, AIX 4.3, or AIX 4.3.1
+Web server:		 Apache 1.2.6 or Apache 1.3.1
+AFS (client):		 AFS Client 3.4a
+Disk Space:		 650 KB
 
 Note: Due to security considerations, OpenAFS strongly recommends that the
-AFS Web Security Pack be used only on a server enabled with Secure Sockets 
+AFS Web Security Pack be used only on a server enabled with Secure Sockets
 Layer (SSL).
 
 
-IV. Known Defects and Limitations 
+IV. Known Defects and Limitations
 
-* Due to a preexisting problem in the AFS UNIX product, the Apache 
-server Fancy Indexing option does not function as expected when AFS 
-directories are displayed. If the Fancy Indexing option is enabled 
-on the Apache server, when a user initially browses an ACL-protected 
-directory (with "system:anyuser l" access), the user is able to see 
-file details for directories and links, but not for files. Once the 
-user selects a file and enters a username and password, details for 
+* Due to a preexisting problem in the AFS UNIX product, the Apache
+server Fancy Indexing option does not function as expected when AFS
+directories are displayed. If the Fancy Indexing option is enabled
+on the Apache server, when a user initially browses an ACL-protected
+directory (with "system:anyuser l" access), the user is able to see
+file details for directories and links, but not for files. Once the
+user selects a file and enters a username and password, details for
 the files are then displayed. This problem is not caused by the AFS Web
-Security Pack or the Apache server, but is due to a defect in the UNIX-based 
-AFS code. We are working to address this problem and will make an 
-announcement when a corrected version is available. In the interim, 
+Security Pack or the Apache server, but is due to a defect in the UNIX-based
+AFS code. We are working to address this problem and will make an
+announcement when a corrected version is available. In the interim,
 please be aware of this limitation as you use the AFS Web Security Pack.
 
-*If the AFS Web Security Pack is used on the Apache server version 1.3.1, user 
+*If the AFS Web Security Pack is used on the Apache server version 1.3.1, user
 directories cannot be directly accessed through the use of a special character
-such as a tilde (~) despite use of the Apache server User Directory directive. 
+such as a tilde (~) despite use of the Apache server User Directory directive.
 
 VII. AFS Web Security Pack Documentation
 
 Postscript and HTML versions of the documentation for the AFS Web Security
-Pack are available in the doc directory. 
+Pack are available in the doc directory.
 
 VIII. Additional Information about Apache and SSL
 
-The following sites on the World Wide Web provide additional information 
+The following sites on the World Wide Web provide additional information
 about the Apache Web Server and SSL.
 
-* Apache Home Page http://www.apache.org 
-* Stronghold Home http://www.c2.net 
-* Stronhold International http://www.int.c2.net 
-* Apache-SSL Home http://www.apache-ssl.org 
+* Apache Home Page http://www.apache.org
+* Stronghold Home http://www.c2.net
+* Stronghold International http://www.int.c2.net
+* Apache-SSL Home http://www.apache-ssl.org
 * SSLeay FAQ http://www.psy.uq.edu.au:8080/~ftp/Crypto/
diff --git a/src/afsweb/README.BETA1 b/src/afsweb/README.BETA1
index fec8d53..cc91fbe 100644
--- a/src/afsweb/README.BETA1
+++ b/src/afsweb/README.BETA1
@@ -5,14 +5,14 @@ This software has been released under the terms of the IBM Public
 License.  For details, see the LICENSE file in the top-level source
 directory or online at http://www.openafs.org/dl/license10.html
 
-Installation instructions for Apache AFS Web Secure 
+Installation instructions for Apache AFS Web Secure
 (Version 1 for Apache version 1.2.6)
 
 Prerequisites:-
 
 Ensure the following files exist:-
 
- - weblog 
+ - weblog
  - weblog_starter
  - libapacheafs.a
  - mod_afs.c
@@ -21,16 +21,16 @@ In addition to these you should know the location of the AFS library
 	libsys.a
 
 
-The mod_afs.c file should be in the apache src directory with all the other 
+The mod_afs.c file should be in the apache src directory with all the other
 module files. weblog and weblog_starter should be in the same directory - this
-could be any directory (preferably outside AFS - if it is in AFS then 
-system:anyuser should have the appropriate ACL on that directiry).
+could be any directory (preferably outside AFS - if it is in AFS then
+system:anyuser should have the appropriate ACL on that directory).
 
 Editing the following files in the apache src and conf directories:-
 
 1. Configuration (or the current Configuration file)
 
-	EXTRA_LIBS= <whatever you had here before> libapacheafs.a libsys.a 
+	EXTRA_LIBS= <whatever you had here before> libapacheafs.a libsys.a
 
 NOTE - specify the full path of these libraries - libsys.a is probably
 in /usr/afsws/lib/afs/libsys.a and you can put libapacheafs.a wherever you
@@ -46,7 +46,7 @@ Otherwise, on startup if the initialization procedure fails, the apache
 server will continue running but AFS authentication will always fail.
 
 2. httpd.conf (or whatever configuration file the server uses on startup
-   with the -f flag) 
+   with the -f flag)
 
 NOTE: ensure that you provide the entire path for the ErrorLog and PidFile
 Directives instead of attempting to have apache prepend ServerRoot.
@@ -56,7 +56,7 @@ Apache Directives.
 
 SetAFSDefaultCell     [cell]
 SetAFSMountpointDir   [dir]
-SetAFSCacheExpiration [time] 
+SetAFSCacheExpiration [time]
 SetAFSTokenExpiration [time]
 SetAFSWeblogPath      [path]
 SetAFSLocation        [loc]
@@ -72,8 +72,8 @@ AllowOverride None
 NOTE:- SetAFSLocation <text> should be the same as the Location <text>
 and should be a path relative to the server-document-root
 
-NOTE: loc and dir should *NOT* be the same. There should be no symbolic link, 
-file or directory in the DocumentRoot directory with the same name as the loc 
+NOTE: loc and dir should *NOT* be the same. There should be no symbolic link,
+file or directory in the DocumentRoot directory with the same name as the loc
 directive.
 
 cell: REQUIRED directive.
@@ -84,14 +84,14 @@ cell: REQUIRED directive.
 dir:  REQUIRED directive.
       Path to the directory or symbolic link relative to the server document
       root directory where the AFS cell mount points are. If you want symbolic
-      links to be followed make sure you have the 
+      links to be followed make sure you have the
 	Options FollowSymLinks
-      directive set. 	
+      directive set.
 
-time: OPTIONAL directive 
+time: OPTIONAL directive
       Seconds for AFS token cache expiration (cacheExpiration is for the local
       cache and tokenExpiration is for the AFS kernel cache manager).
-	
+
 
 path: REQUIRED directive.
       The full or relative (to server binary) path for weblog binary.
@@ -99,23 +99,23 @@ path: REQUIRED directive.
 loc:  REQUIRED directive.
       Some location relative to the server root
       MAKE SURE THAT THERE DOESN"T ALREADY EXIST A DIRECTORY BY
-      THIS SAME NAME. This should be the same (case sensitive) 
+      THIS SAME NAME. This should be the same (case sensitive)
       as the argument to the Location directive. Eg. /afs
 
 
 Configure and make apache and start it up with the new config file.
 
-NOTE: Add the following to the shutdown or stopd file to shutdown the 
+NOTE: Add the following to the shutdown or stopd file to shutdown the
       weblog_starter process BEFORE the kill -TERM for httpd.pid
 
 	kill -TERM `cat <path to httpd.pid>.afs`
 
-Eg. if the httpd.pid file is in /local/stronghold/apache/logs/httpd.pid 
+Eg. if the httpd.pid file is in /local/stronghold/apache/logs/httpd.pid
 then the stopd file should look something like this
 
 	kill -TERM `cat /local/stronghold/apache/logs/httpd.pid.afs`
- 
- 	kill -TERM `cat /local/stronghold/apache/logs/httpd.pid`	
+
+	kill -TERM `cat /local/stronghold/apache/logs/httpd.pid`
 
 
 POINTERS TO APACHE AND SSL:-
diff --git a/src/afsweb/README.BETA2 b/src/afsweb/README.BETA2
index 9c5e08a..82e1ce5 100644
--- a/src/afsweb/README.BETA2
+++ b/src/afsweb/README.BETA2
@@ -11,284 +11,284 @@ Release Notes
 
 I. Introduction
 
-AFS Web Security Pack is an extension available for selected Web servers 
-that enables system administrators to provide secure access via a 
-Web browser to documents stored in the AFS filespace. This document 
-summarizes the changes made to AFS Web Security for this release, and 
-provides installation and configuration instructions. 
+AFS Web Security Pack is an extension available for selected Web servers
+that enables system administrators to provide secure access via a
+Web browser to documents stored in the AFS filespace. This document
+summarizes the changes made to AFS Web Security for this release, and
+provides installation and configuration instructions.
 
-Note: Due the long filenames and file extensions used for the AFS Web 
+Note: Due the long filenames and file extensions used for the AFS Web
 Security Pack distribution files, download of the AFS Web Security Pack
- product to a PC sometimes results in incorrect filenames. Note that all 
-AFS Web Security Pack distribution files are g-zipped tar files, even if the 
-*.tar.gz file extension is lost during the download process. 
+ product to a PC sometimes results in incorrect filenames. Note that all
+AFS Web Security Pack distribution files are g-zipped tar files, even if the
+*.tar.gz file extension is lost during the download process.
 
 II. Installation Prerequisites
 
-Your system must meet the following software and disk space requirements 
+Your system must meet the following software and disk space requirements
 to install this version of AFS Web Security Pack.
 
-Operating system:	 Solaris 2.5.1, AIX 4.1, AIX 4.2, or AIX 4.2.1 
-Web server:		 Apache 1.2.6 
-AFS (client):		 AFS Client 3.4a 
-Disk Space:		 650 KB 
+Operating system:	 Solaris 2.5.1, AIX 4.1, AIX 4.2, or AIX 4.2.1
+Web server:		 Apache 1.2.6
+AFS (client):		 AFS Client 3.4a
+Disk Space:		 650 KB
 
-Note: Due to security considerations, OpenAFS strongly recommends that 
-AFS Web Security Pack be used only on a server enabled with Secure 
+Note: Due to security considerations, OpenAFS strongly recommends that
+AFS Web Security Pack be used only on a server enabled with Secure
 Sockets Layer (SSL).
 
 III. New Features and Product Changes
 
-The following list describes new features and changes that are included 
+The following list describes new features and changes that are included
 in this version of AFS Web Security Pack.
 
-*  Configuration of AFS Web Security Pack is now easier and more flexible. The 
-AFSMountPointDir and AFSLocation directives are no longer required. 
-Instead, during configuration of AFS Web Security Pack, an authorization type 
-(AFSAuthType) of AFS is now specified. (See the Installation and Configuration 
+*  Configuration of AFS Web Security Pack is now easier and more flexible. The
+AFSMountPointDir and AFSLocation directives are no longer required.
+Instead, during configuration of AFS Web Security Pack, an authorization type
+(AFSAuthType) of AFS is now specified. (See the Installation and Configuration
 instructions that follow for additional details.)
 
-*  The Log In dialog box that is displayed when users attempt to access 
-the AFS file space via a web browser can now be customized adding the 
-AFSLoginPrompt directive to the Apache server runtime configuration 
-file. (See the Installation and Configuration instructions that follow for 
+*  The Log In dialog box that is displayed when users attempt to access
+the AFS file space via a web browser can now be customized adding the
+AFSLoginPrompt directive to the Apache server runtime configuration
+file. (See the Installation and Configuration instructions that follow for
 additional details.)
 
 
 
-*  AFS Web Security Pack now provides the ability to log attempts to 
-access AFS in which permission is denied. This logging can be used to 
+*  AFS Web Security Pack now provides the ability to log attempts to
+access AFS in which permission is denied. This logging can be used to
 determine if users are attempting to access information that they are not
  authorized to view. To configure this logging, you must add the
- SetAFSAccessLog directive to the Apache server runtime configuration file. 
-(See the Installation and Configuration instructions that follow for 
+ SetAFSAccessLog directive to the Apache server runtime configuration file.
+(See the Installation and Configuration instructions that follow for
 additional details.)
 
-*  AFS Web Security Pack now provides the ability to translate and access user 
-directories that are specified with a special character such as a tilde (~), 
-for example. http://www.yourcompany.com/~smith. To enable this feature, you 
-must add the User Directory directive to the Apache server runtime 
-configuration file. (See the Installation and Configuration instructions 
+*  AFS Web Security Pack now provides the ability to translate and access user
+directories that are specified with a special character such as a tilde (~),
+for example. http://www.yourcompany.com/~smith. To enable this feature, you
+must add the User Directory directive to the Apache server runtime
+configuration file. (See the Installation and Configuration instructions
 that follow for additional details.)
 
-*  The previous version of AFS Web Security Pack did not correctly permit 
-directory indexing of directories for which a user was assigned lookup 
-permission. In addition, the Parent Link in directory indexes did not 
-always work correctly. This version of AFS Web Security Pack corrects these 
+*  The previous version of AFS Web Security Pack did not correctly permit
+directory indexing of directories for which a user was assigned lookup
+permission. In addition, the Parent Link in directory indexes did not
+always work correctly. This version of AFS Web Security Pack corrects these
 problems.
 
-*  This version of AFS Web Security Pack corrects a problem with the token cache 
+*  This version of AFS Web Security Pack corrects a problem with the token cache
 that occasionally caused access to AFS to be incorrectly denied.
 
-*  The previous version of AFS Web Security Pack did not accept AFS passwords 
+*  The previous version of AFS Web Security Pack did not accept AFS passwords
 that included a space. This version of AFS Web Security Pack corrects this problem.
 
-*  This version of AFS Web Security Pack corrects a communication (pipe) problem 
-that occasionally caused the message SERVER_ERROR to be returned. In 
+*  This version of AFS Web Security Pack corrects a communication (pipe) problem
+that occasionally caused the message SERVER_ERROR to be returned. In
 addition, this version improves performance of AFS Web Security Pack.
 
-IV. Known Defects and Limitations 
-
-* Due to a preexisting problem in the AFS UNIX product, the Apache 
-server Fancy Indexing option does not function as expected when AFS 
-directories are displayed. If the Fancy Indexing option is enabled 
-on the Apache server, when a user initially browses an ACL-protected 
-directory (with "system:anyuser l" access), the user is able to see 
-file details for directories and links, but not for files. Once the 
-user selects a file and enters a username and password, details for 
-the files are then displayed. This problem is not caused by AFS Web 
-Security Pack or the Apache server, but is due to a defect in the UNIX-based 
-AFS code. We are working to address this problem and will make an 
-announcement when a corrected version is available. In the interim, 
-please be aware of this limitation as you continue testing. 
-
-V. Upgrade Instructions for AFS Web Security Pack for the Apache Web Server 
-
-Note: Use the following instructions to upgrade AFS Web Security Pack on 
-your Apache Web Server if Beta Version 1 or Beta Version 2 of the product 
-is already installed. (If this is the first time you are installing AFS Web 
-Security Pack, follow the instructions in the next section, Installing and 
+IV. Known Defects and Limitations
+
+* Due to a preexisting problem in the AFS UNIX product, the Apache
+server Fancy Indexing option does not function as expected when AFS
+directories are displayed. If the Fancy Indexing option is enabled
+on the Apache server, when a user initially browses an ACL-protected
+directory (with "system:anyuser l" access), the user is able to see
+file details for directories and links, but not for files. Once the
+user selects a file and enters a username and password, details for
+the files are then displayed. This problem is not caused by AFS Web
+Security Pack or the Apache server, but is due to a defect in the UNIX-based
+AFS code. We are working to address this problem and will make an
+announcement when a corrected version is available. In the interim,
+please be aware of this limitation as you continue testing.
+
+V. Upgrade Instructions for AFS Web Security Pack for the Apache Web Server
+
+Note: Use the following instructions to upgrade AFS Web Security Pack on
+your Apache Web Server if Beta Version 1 or Beta Version 2 of the product
+is already installed. (If this is the first time you are installing AFS Web
+Security Pack, follow the instructions in the next section, Installing and
 Configuring AFS Web Security PAck 1.0 for the Apache Web Server.)
 
-1. Replace the existing versions of the weblog, weblog_starter and 
-libapacheafs.a files with the new files provided with this version 
-of AFS Web Security Pack 1.0. Also, in the Apache src directory, 
+1. Replace the existing versions of the weblog, weblog_starter and
+libapacheafs.a files with the new files provided with this version
+of AFS Web Security Pack 1.0. Also, in the Apache src directory,
 replace the mod_afs.c or afs_module.c file with the new AFS Web Security Pack
-Module, afs_module.c. 
+Module, afs_module.c.
 
-2. In the Apache server Configuration file, change the line that 
-references the AFS Web Security Pack module so that the line appears as 
+2. In the Apache server Configuration file, change the line that
+references the AFS Web Security Pack module so that the line appears as
 follows:
 
     Module afs_module       afs_module.o
 
 Note: If you want to enable AFS Web Security Pack to translate and access user
- home directories, you must include the userdir_module when you build 
-the Apache server. For information on including modules when building 
+ home directories, you must include the userdir_module when you build
+the Apache server. For information on including modules when building
 the Apache server, consult you Apache server documentation.
 
-3. In the Apache server src directory, run the Configure script to 
-create a new configuration Makefile for your operating system. 
+3. In the Apache server src directory, run the Configure script to
+create a new configuration Makefile for your operating system.
 
-4. Stop the Apache server process (httpd). Then, issue the make 
-command to compile the Apache server. 
+4. Stop the Apache server process (httpd). Then, issue the make
+command to compile the Apache server.
 
-5. In the Apache server runtime configuration file, remove (or comment 
+5. In the Apache server runtime configuration file, remove (or comment
 out) the following two lines:
 
     SetAFSMountpointDir /afs_mountpoint_directory
     SetAFSLocation /afs_location
 
-6. In the Apache server runtime configuration file, replace (or 
-comment out) the SetHandler afs-authentication parameter with the 
-AFSAuthType AFS parameter, so that the Location directive appears as 
+6. In the Apache server runtime configuration file, replace (or
+comment out) the SetHandler afs-authentication parameter with the
+AFSAuthType AFS parameter, so that the Location directive appears as
 follows:
 
     <Location /afs>
     AFSAuthType AFS
     </Location>
 
-where /afs is the directory (or symbolic link to the directory) 
-that contains the mount points to AFS to be used by the Apache 
-server and AFS Web Security Pack. 
+where /afs is the directory (or symbolic link to the directory)
+that contains the mount points to AFS to be used by the Apache
+server and AFS Web Security Pack.
 
-Note: You can specify AFSAuthType AFS for multiple locations to indicate 
+Note: You can specify AFSAuthType AFS for multiple locations to indicate
 that AFS Web Security Pack authentication must be used when a user attempts to
-access a specific location. (In specifying a location, you can use wildcard 
+access a specific location. (In specifying a location, you can use wildcard
 characters if desired.)
 
-7. (Optional) To customize the authorization dialog box that is 
-displayed when users attempt to access the AFS file space via a 
+7. (Optional) To customize the authorization dialog box that is
+displayed when users attempt to access the AFS file space via a
 web browser, add the following line within the Location directive:
 
     AFSLoginPrompt [Custom Text]
 
-where [Custom Text] is the text that you want to appear in the dialog 
-box that prompts users to enter a user name and password to access AFS 
+where [Custom Text] is the text that you want to appear in the dialog
+box that prompts users to enter a user name and password to access AFS
 filespace.
 
-8. (Optional) To enable AFS Web Security Pack to access user directories, 
-add the following lines to the Apache server runtime configuration 
-file. This directive specifies the syntax used to access user 
-directories and indicates that attempts to access user directories 
+8. (Optional) To enable AFS Web Security Pack to access user directories,
+add the following lines to the Apache server runtime configuration
+file. This directive specifies the syntax used to access user
+directories and indicates that attempts to access user directories
 in the AFS filespace must be passed to AFS Web Security Pack:
 
     <Location /~*>
     AFSAuthtype AFS
     </Location>
 
-Then, add the following line to the Apache server runtime configuration 
+Then, add the following line to the Apache server runtime configuration
 file to indicate the location of user directories in AFS:
 
     UserDir [Users Directory]
 
 where Users Directory indicates the location of user's home directories.
 
-Note: To enable user directory access in this manner, the Apache Server 
-must include the UserDir module. For information on including this 
-module when building the Apache server, consult you Apache server 
+Note: To enable user directory access in this manner, the Apache Server
+must include the UserDir module. For information on including this
+module when building the Apache server, consult you Apache server
 documentation.
 
-9. (Optional) To enable logging of attempts to access AFS in which 
-permission is denied, add the SetAFSAccessLog directive to the Apache 
+9. (Optional) To enable logging of attempts to access AFS in which
+permission is denied, add the SetAFSAccessLog directive to the Apache
 server runtime configuration file as follows:
 
     SetAFSAccessLog [Access Log File]
 
-where [Access Log File] is the full path log file in which failed access 
-attempts are to be recorded. 
+where [Access Log File] is the full path log file in which failed access
+attempts are to be recorded.
 
-10. If necessary, rename the symbolic link to the AFS filespace in the 
-Apache server's document root directory with the name specified in the 
-Location directive for the AFS filespace in the server's runtime 
-configuration file. 
+10. If necessary, rename the symbolic link to the AFS filespace in the
+Apache server's document root directory with the name specified in the
+Location directive for the AFS filespace in the server's runtime
+configuration file.
 
 VI. Installing and Configuring AFS Web Security Pack 1.0 for the Apache Web Server
 
-This section provides brief installation and configuration instructions 
-for Apache AFS Web Security Pack (Version 1.0 for Apache version 1.2.6 
-and Apache version 1.3.1). See the product documentation for complete installation 
-and configuration instructions and for details about using the configuration script to 
+This section provides brief installation and configuration instructions
+for Apache AFS Web Security Pack (Version 1.0 for Apache version 1.2.6
+and Apache version 1.3.1). See the product documentation for complete installation
+and configuration instructions and for details about using the configuration script to
 set up AFS Web Security Pack on the Apache server.
 
-1. Uncompress and extract the files from the .tar.gz file, placing the 
-files in the following locations, where Apache Installation Directory 
-is the full pathname of the directory where the Apache Web server is 
+1. Uncompress and extract the files from the .tar.gz file, placing the
+files in the following locations, where Apache Installation Directory
+is the full pathname of the directory where the Apache Web server is
 installed:
 
--    Place both the weblog and weblog_starter files in one directory, 
-for example, Apache Installation Directory/afswebsecurity. These files 
-can be placed in any directory as long as they remain together. However, 
-if the weblog and weblog_starter files are placed in a directory in AFS, 
-ensure that either the user that the Apache Web server runs as, or the 
-AFS group system:anyuser is designated as having read and lookup privileges 
-on the directory's Access Control List (ACL). 
+-    Place both the weblog and weblog_starter files in one directory,
+for example, Apache Installation Directory/afswebsecurity. These files
+can be placed in any directory as long as they remain together. However,
+if the weblog and weblog_starter files are placed in a directory in AFS,
+ensure that either the user that the Apache Web server runs as, or the
+AFS group system:anyuser is designated as having read and lookup privileges
+on the directory's Access Control List (ACL).
 
--    Place the libapacheafs.a file in any directory, for example, 
-Apache Installation Directory/afswebsecurity. 
+-    Place the libapacheafs.a file in any directory, for example,
+Apache Installation Directory/afswebsecurity.
 
 -    Place the afs_module.c file in the Apache src directory (Apache version 1.2.6)
 or in the src/modules/extra directory (Apache version 1.3.1)
-(generally located directly beneath the Apache Installation Directory). 
+(generally located directly beneath the Apache Installation Directory).
 
-In addition, note the location of the AFS library file, libsys.a. This 
-file is installed with the AFS client, and is generally located in the 
-/usr/afsws/lib/afs directory. 
+In addition, note the location of the AFS library file, libsys.a. This
+file is installed with the AFS client, and is generally located in the
+/usr/afsws/lib/afs directory.
 
 2. Modify the Apache Server Configuration File as follows.
 
-Locate the EXTRA_LIBS line in the file, and add the paths to the 
-libapacheafs.a and libsys.a libraries so that the line reads as follows: 
+Locate the EXTRA_LIBS line in the file, and add the paths to the
+libapacheafs.a and libsys.a libraries so that the line reads as follows:
 
     EXTRA_LIBS=[full path to libapacheafs.a] [full path to libsys.a]
 
-In the Module configuration section of the file, add a reference to the 
-AFS Web Security Pack module. It is recommended that the AFS Web Security Pack 
+In the Module configuration section of the file, add a reference to the
+AFS Web Security Pack module. It is recommended that the AFS Web Security Pack
 module be the first Authentication module.
-To add the AFS module to the list of Apache server modules, add the following line 
-to the Configuration file: 
+To add the AFS module to the list of Apache server modules, add the following line
+to the Configuration file:
 
     Module afs_module         afs_module.o
 
-Note: If you want the server to attempt to stop completely if AFS 
-initialization fails, also add -DSHUTDOWN_IF_AFS_FAILS to the 
-EXTRA_CFLAGS line in this file. Otherwise, on startup if the 
-initialization procedure fails on startup, the Apache server 
+Note: If you want the server to attempt to stop completely if AFS
+initialization fails, also add -DSHUTDOWN_IF_AFS_FAILS to the
+EXTRA_CFLAGS line in this file. Otherwise, on startup if the
+initialization procedure fails on startup, the Apache server
 will continue to run but AFS authentication will always fail.
 
-3. Modify the Apache Server Runtime Configuration File (for example, 
+3. Modify the Apache Server Runtime Configuration File (for example,
 httpd.conf) as follows.
 
-Add the following lines to the runtime configuration file: 
+Add the following lines to the runtime configuration file:
 
     SetAFSDefault [Cell cellname]
     SetAFSCacheExpiration [cache_expiration]
     SetAFSTokenExpiration [token_expiration]
     SetAFSWeblogPath [weblog_starter_path]
 
-where the arguments for these Apache server directives are as follows: 
+where the arguments for these Apache server directives are as follows:
 
-[cellname] - The name of the default AFS cell to be accessed via the 
+[cellname] - The name of the default AFS cell to be accessed via the
 Apache server and AFS Web Security Pack.
 
-[cache_expiration] -The maximum lifetime in seconds of an AFS token 
-that is stored in the local cache. The default recommendation for 
-this argument is 300 seconds (5 minutes). 
+[cache_expiration] -The maximum lifetime in seconds of an AFS token
+that is stored in the local cache. The default recommendation for
+this argument is 300 seconds (5 minutes).
 
-[token_expiration] -The maximum lifetime in seconds of an AFS token 
-that is stored in the AFS kernel Cache Manager. The default 
-recommendation for this argument is 60 seconds (1 minute). 
+[token_expiration] -The maximum lifetime in seconds of an AFS token
+that is stored in the AFS kernel Cache Manager. The default
+recommendation for this argument is 60 seconds (1 minute).
 
-[weblog_starter_path] -The path to the AFS Web Security Pack weblog_starter program. 
+[weblog_starter_path] -The path to the AFS Web Security Pack weblog_starter program.
 Specify the full path or a path relative to the path set by the ServerRoot Apache
-directive. 
+directive.
 
-Note: To enable logging of failed attempts to access AFS in which permission 
+Note: To enable logging of failed attempts to access AFS in which permission
 is denied, also add the directive:
 
     SetAFSAccessLog [Access Log File]
 
-where [Access Log File] is the full path of the log file in which 
+where [Access Log File] is the full path of the log file in which
 failed access attempts are to be recorded.
 
 Then, add the following additional lines to the runtime configuration file:
@@ -297,78 +297,78 @@ Then, add the following additional lines to the runtime configuration file:
     AFSAuthType AFS
     </Location>
 
-where [afs] is the request provided by users in combination with the 
+where [afs] is the request provided by users in combination with the
 server hostname and domain in order to access AFS filespace.
 
 Note: This directive only works within Location (and LocationMatch for Apache 1.3.1)
 tags and not in any other tags such as Directory or File.
 
-Note: You can specify AFSAuthType AFS for multiple locations to indicate 
+Note: You can specify AFSAuthType AFS for multiple locations to indicate
 that AFS Web Security Pack authentication must be used when a user attempts to
-access a specific location. (In specifying a location, you can use wildcard 
+access a specific location. (In specifying a location, you can use wildcard
 characters if desired.)
 
-(Optional) To customize the authorization dialog box that is displayed 
-when a user attempts to access the AFS file space via a web browser, 
-add the follwing line to the Location directive added in the previous 
-step. The Location directive then appears as follows: 
+(Optional) To customize the authorization dialog box that is displayed
+when a user attempts to access the AFS file space via a web browser,
+add the following line to the Location directive added in the previous
+step. The Location directive then appears as follows:
 
     AFSLoginPrompt [Custom Text]
 
-where [Custom Text] is the text that you want to appear in the dialog box 
-that prompts users to enter an AFS user name and password to access the 
-AFS filespace. 
+where [Custom Text] is the text that you want to appear in the dialog box
+that prompts users to enter an AFS user name and password to access the
+AFS filespace.
 
-(Optional) To enable AFS Web Security Pack to access user directories, add the 
-following additional Location directive to the Apache server runtime 
-configuration file. 
+(Optional) To enable AFS Web Security Pack to access user directories, add the
+following additional Location directive to the Apache server runtime
+configuration file.
 
     <Location /~*>
     AFSAuthType AFS
     </Location>
 
-Then, also add the following additional line to the Apache server runtime 
-configuration file to indicate the location of user directories in AFS. 
+Then, also add the following additional line to the Apache server runtime
+configuration file to indicate the location of user directories in AFS.
 
     UserDir [Users Directory]
 
-where [Users Directory] indicates the location of user's home 
-directories in AFS. The location is specified relative to the 
-server document root directory. 
+where [Users Directory] indicates the location of user's home
+directories in AFS. The location is specified relative to the
+server document root directory.
 
-Note: To enable user directory access in this manner, the Apache 
-server must include the User Dir module. 
+Note: To enable user directory access in this manner, the Apache
+server must include the User Dir module.
 
-Save and close the modified runtime configuration file. 
+Save and close the modified runtime configuration file.
 
-4.  Stop the Apache server process (httpd). Then, configure and make 
-the Apache server and start it up with the new runtime configuration 
+4.  Stop the Apache server process (httpd). Then, configure and make
+the Apache server and start it up with the new runtime configuration
 file.
 
-5. Add the following to the shutdown or stopd file to shutdown the 
+5. Add the following to the shutdown or stopd file to shutdown the
 weblog_starter process BEFORE the kill -TERM for httpd.pid:
 
     kill -TERM `cat [path to httpd.pid].afs`
 
-For example, if the httpd.pid file is in 
-/local/stronghold/apache/logs/httpd.pid, then the stopd file should 
+For example, if the httpd.pid file is in
+/local/stronghold/apache/logs/httpd.pid, then the stopd file should
 look something like this:
 
     kill -TERM `cat /local/stronghold/apache/logs/httpd.pid.afs`
-    kill -TERM `cat /local/stronghold/apache/logs/httpd.pid` 
+    kill -TERM `cat /local/stronghold/apache/logs/httpd.pid`
 
 VII. AFS Web Security Pack Documentation
 
-Postscript and HTML versions of the documentation for the initial 
-Beta release AFS Web Security Pack are available in the doc directory. 
+Postscript and HTML versions of the documentation for the initial
+Beta release AFS Web Security Pack are available in the doc directory.
 
 VIII. Additional Information about Apache and SSL
 
-The following sites on the World Wide Web provide additional information 
+The following sites on the World Wide Web provide additional information
 about the Apache Web Server and SSL.
 
-* Apache Home Page http://www.apache.org 
-* Stronghold Home http://www.c2.net 
-* Stronhold International http://www.int.c2.net 
-* Apache-SSL Home http://www.apache-ssl.org 
+* Apache Home Page http://www.apache.org
+* Stronghold Home http://www.c2.net
+* Stronghold International http://www.int.c2.net
+* Apache-SSL Home http://www.apache-ssl.org
 * SSLeay FAQ http://www.psy.uq.edu.au:8080/~ftp/Crypto/
diff --git a/src/aklog/aklog.c b/src/aklog/aklog.c
index c9fe9e8..c5bc9df 100644
--- a/src/aklog/aklog.c
+++ b/src/aklog/aklog.c
@@ -1520,15 +1520,22 @@ main(int argc, char *argv[])
     {
 	char *filepath = NULL, *newpath = NULL;
 #ifndef AFS_DARWIN_ENV
-	char *defaultpath = "/etc/krb5.conf";
+	char *defaultpath = "/etc/krb5.conf:/etc/krb5/krb5.conf";
 #else
 	char *defaultpath = "~/Library/Preferences/edu.mit.Kerberos:/Library/Preferences/edu.mit.Kerberos";
 #endif
 	filepath = getenv("KRB5_CONFIG");
-	afs_asprintf(&newpath, "%s:%s/krb5-weak.conf",
-		 filepath ? filepath : defaultpath,
-		 AFSDIR_CLIENT_ETC_DIRPATH);
-	setenv("KRB5_CONFIG", newpath, 1);
+
+	/* only fiddle with KRB5_CONFIG if krb5-weak.conf actually exists */
+	afs_asprintf(&newpath, "%s/krb5-weak.conf", AFSDIR_CLIENT_ETC_DIRPATH);
+	if (access(newpath, R_OK) == 0) {
+	    free(newpath);
+	    newpath = NULL;
+	    afs_asprintf(&newpath, "%s:%s/krb5-weak.conf",
+	                 filepath ? filepath : defaultpath,
+	                 AFSDIR_CLIENT_ETC_DIRPATH);
+	    setenv("KRB5_CONFIG", newpath, 1);
+	}
 #endif
 	krb5_init_context(&context);
 
diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c
index 43a1321..de3e491 100644
--- a/src/bozo/bosserver.c
+++ b/src/bozo/bosserver.c
@@ -969,7 +969,7 @@ main(int argc, char **argv, char **envp)
 #ifndef AFS_NT40_ENV
 	    printf("Usage: bosserver [-noauth] [-log] "
 		   "[-auditlog <log path>] "
-		   "[-audit-interafce <file|sysvmq> (default is file)] "
+		   "[-audit-interface <file|sysvmq> (default is file)] "
 		   "[-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals]"
 		   "[-syslog[=FACILITY]] "
 		   "[-restricted] "
@@ -980,7 +980,7 @@ main(int argc, char **argv, char **envp)
 #else
 	    printf("Usage: bosserver [-noauth] [-log] "
 		   "[-auditlog <log path>] "
-		   "[-audit-interafce <file|sysvmq> (default is file)] "
+		   "[-audit-interface <file|sysvmq> (default is file)] "
 		   "[-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals]"
 		   "[-restricted] "
 		   "[-enable_peer_stats] [-enable_process_stats] "
@@ -1111,6 +1111,13 @@ main(int argc, char **argv, char **envp)
 	exit(code);
     }
 
+    /* Disable jumbograms */
+    rx_SetNoJumbo();
+
+    if (rxMaxMTU != -1) {
+	rx_SetMaxMTU(rxMaxMTU);
+    }
+
     code = LWP_CreateProcess(BozoDaemon, BOZO_LWP_STACKSIZE, /* priority */ 1,
 			     /* param */ NULL , "bozo-the-clown",
 			     &bozo_pid);
@@ -1173,13 +1180,6 @@ main(int argc, char **argv, char **envp)
 	bozo_CreatePidFile("bosserver", NULL, getpid());
     }
 
-    /* Disable jumbograms */
-    rx_SetNoJumbo();
-
-    if (rxMaxMTU != -1) {
-	rx_SetMaxMTU(rxMaxMTU);
-    }
-
     tservice = rx_NewServiceHost(host, 0, /* service id */ 1,
 			         "bozo", securityClasses, numClasses,
 				 BOZO_ExecuteRequest);
diff --git a/src/bucoord/commands.c b/src/bucoord/commands.c
index ac9dcbb..a1c1385 100644
--- a/src/bucoord/commands.c
+++ b/src/bucoord/commands.c
@@ -926,11 +926,10 @@ bc_WaitForNoJobs(void)
 {
     int i;
     int usefulJobRunning = 1;
+    int printWaiting = 1;
 
     extern dlqlinkT statusHead;
 
-    afs_com_err(whoami, 0, "waiting for job termination");
-
     while (usefulJobRunning) {
 	usefulJobRunning = (dlqEmpty(&statusHead) ? 0 : 1);
 	if (dispatchLock.excl_locked)
@@ -941,8 +940,13 @@ bc_WaitForNoJobs(void)
 	}
 
 	/* Wait 5 seconds and check again */
-	if (usefulJobRunning)
+	if (usefulJobRunning) {
+            if (printWaiting) {
+                afs_com_err(whoami, 0, "waiting for job termination");
+                printWaiting = 0;
+            }
 	    IOMGR_Sleep(5);
+        }
     }
     return (lastTaskCode);
 }
diff --git a/src/budb/.gitignore b/src/budb/.gitignore
index 1427515..d812870 100644
--- a/src/budb/.gitignore
+++ b/src/budb/.gitignore
@@ -3,7 +3,6 @@
 # to check that you haven't inadvertently ignored any tracked files.
 
 /budb.h
-/budb_client.h
 /budb_errs.c
 /budb_errs.h
 /budb_server
diff --git a/src/budb/Makefile.in b/src/budb/Makefile.in
index 29ce529..992159b 100644
--- a/src/budb/Makefile.in
+++ b/src/budb/Makefile.in
@@ -25,6 +25,8 @@ INCLS=\
 	${TOP_INCDIR}/afs/cellconfig.h \
 	${TOP_INCDIR}/afs/com_err.h \
 	${TOP_INCDIR}/afs/bubasics.h \
+	${TOP_INCDIR}/afs/budb_client.h \
+	${TOP_INCDIR}/afs/budb_errs.h \
 	budb.h budb_client.h database.h
 
 # library ordering defined by top level makefile
@@ -52,7 +54,7 @@ SERVER_OBJS = ${COMMON_OBJS} budb.ss.o budb.xdr.o dbs_dump.o db_lock.o db_text.o
 all: ${TOP_LIBDIR}/libbudb.a ${TOP_INCDIR}/afs/budb.h ${TOP_INCDIR}/afs/budb_errs.h ${TOP_INCDIR}/afs/budb_prototypes.h budb_server
 
 generated: \
-	budb_errs.c budb_errs.h budb_client.h \
+	budb_errs.c budb_errs.h \
 	budb.cs.c budb.ss.c budb.xdr.c budb.h
 
 ${TOP_LIBDIR}/libbudb.a: libbudb.a
@@ -62,7 +64,7 @@ ${TOP_INCDIR}/afs/budb.h: budb.h
 	${INSTALL_DATA} $? $@
 
 ${TOP_INCDIR}/afs/budb_errs.h: budb_errs.h
-	${INSTALL_DATA} $? $@
+	${INSTALL_DATA} budb_errs.h $@
 
 ${TOP_INCDIR}/afs/budb_client.h: budb_client.h
 	${INSTALL_DATA} $? $@
@@ -70,18 +72,10 @@ ${TOP_INCDIR}/afs/budb_client.h: budb_client.h
 ${TOP_INCDIR}/afs/budb_prototypes.h: budb_prototypes.h
 	${INSTALL_DATA} $? $@
 
-#
-# budb_errs.o actually depends on neither budb_client.h nor budb_errs.h
-# but generating either of them will rebuild budb_errs.c
-#
-budb_errs.o: budb_errs.c budb_client.h budb_errs.h
-
-budb_client.h: budb_errs.c
-
-budb_errs.c: budb_errs.et budb_client.p.h
-	$(RM) -f budb_client.h budb_errs.c; ${COMPILE_ET} -p ${srcdir} budb_errs -h budb_client
+budb_errs.h: budb_errs.c
 
-budb_errs.h: budb_errs.et
+budb_errs.c: budb_errs.et
+	$(RM) -f budb_errs.c
 	${COMPILE_ET} -p ${srcdir} budb_errs
 
 database.o: database.c budb_errs.h globals.h ${INCLS}
@@ -92,7 +86,7 @@ db_text.o:  db_text.c budb_errs.h ${INCLS}
 db_hash.o: db_hash.c budb_errs.h ${INCLS}
 ol_verify.o:	ol_verify.c budb_errs.h ${INCLS}
 procs.o: procs.c budb_errs.h globals.h ${INCLS}
-struct_ops.o: budb_errs.h ${TOP_INCDIR}/afs/budb_client.h
+struct_ops.o: budb_errs.h ${INCLS}
 server.o: server.c budb_errs.h ${INCLS} AFS_component_version_number.c
 
 budb_server: $(SERVER_OBJS) ${LIBS} ${TOP_INCDIR}/afs/budb_client.h
@@ -146,7 +140,7 @@ dest: libbudb.a budb.h budb_errs.h budb_client.h budb_server
 # Misc targets
 #
 clean:
-	$(RM) -f *.o *~ budb_errs.[ch] budb.h budb_client.h *.a *.xdr.c \
+	$(RM) -f *.o *~ budb_errs.[ch] budb.h *.a *.xdr.c \
 		*.ss.c *.cs.c core budb_server AFS_component_version_number.c
 
 include ../config/Makefile.version
diff --git a/src/budb/NTMakefile b/src/budb/NTMakefile
index ad994bb..1d78194 100644
--- a/src/budb/NTMakefile
+++ b/src/budb/NTMakefile
@@ -113,14 +113,13 @@ $(INCFILEDIR)\budb.h: budb.h
 
 ############################################################################
 # compile_et on budb_errs.et
-$(INCFILEDIR)\budb_errs.h : budb_errs.et
-	$(COMPILE_ET) budb_errs -h budb_errs
+
+$(INCFILEDIR)\budb_errs.h: budb_errs.c
 	$(COPY) budb_errs.h $(INCFILEDIR)\budb_errs.h
 
-budb_errs.c $(INCFILEDIR)\budb_client.h: budb_errs.et budb_client.p.h
-	$(DEL) budb_client.h budb_errs.c
-	$(COMPILE_ET) budb_errs -h budb_client
-	$(COPY) budb_client.h $(INCFILEDIR)\budb_client.h
+budb_errs.c: budb_errs.et
+	$(DEL) budb_errs.c
+	$(COMPILE_ET) budb_errs
 
 ############################################################################
 # install 
@@ -133,7 +132,7 @@ install: $(INCFILES) $(LIBFILE) $(EXEFILE)
 
 clean::
         $(DEL) $(INCFILES)
-	$(DEL) budb_errs.c budb_errs.h budb.h budb_client.h	
+	$(DEL) budb_errs.c budb_errs.h budb.h
 	$(DEL) budb.cs.c budb.ss.c budb.xdr.c
 
 mkdir:
diff --git a/src/budb/budb_client.h b/src/budb/budb_client.h
new file mode 100644
index 0000000..ce5e234
--- /dev/null
+++ b/src/budb/budb_client.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+#ifndef __BUDB_CLIENT__
+#define __BUDB_CLIENT__
+
+#include <ubik.h>
+#ifndef BUDB_MAJORVERSION	/* get the installed RPC stuff */
+#include <sys/types.h>
+#include <rx/xdr.h>
+#include <afs/budb.h>
+#endif
+
+#include <afs/budb_errs.h>
+
+/* for ubik_Call_SingleServer */
+
+#define UF_SINGLESERVER         1	/* begin single server operation */
+#define UF_END_SINGLESERVER     2	/* terminate single server operation */
+
+
+/* handle for the ubik database connection */
+
+struct udbHandleS {
+    afs_int32 uh_scIndex;	/* what type of sec. object */
+    struct rx_securityClass *uh_secobj;	/* security object */
+    struct rx_connection *uh_serverConn[MAXSERVERS];	/* server connections */
+    struct ubik_client *uh_client;	/* ubik client handle */
+    afs_uint32 uh_instanceId;	/* instance of client */
+};
+
+typedef struct udbHandleS udbHandleT;
+typedef udbHandleT *udbHandleP;
+
+/* suggested text block management structure */
+
+struct udbClientTextS {
+    char *textName;		/* for info. only */
+    afs_int32 textType;		/* used as key for access */
+    afs_uint32 textVersion;	/* version # for cache mgmt */
+    afs_uint32 lockHandle;	/* for atomicity */
+    afs_int32 textSize;		/* no. of bytes */
+    FILE *textStream;		/* file stream or NULL */
+};
+
+typedef struct udbClientTextS udbClientTextT;
+typedef udbClientTextT *udbClientTextP;
+
+#endif
diff --git a/src/budb/budb_client.p.h b/src/budb/budb_client.p.h
deleted file mode 100644
index 9088fec..0000000
--- a/src/budb/budb_client.p.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- *
- * This software has been released under the terms of the IBM Public
- * License.  For details, see the LICENSE file in the top-level source
- * directory or online at http://www.openafs.org/dl/license10.html
- */
-
-#ifndef __BUDB_CLIENT__
-#define __BUDB_CLIENT__
-
-#include <ubik.h>
-#ifndef BUDB_MAJORVERSION	/* get the installed RPC stuff */
-#include <sys/types.h>
-#include <rx/xdr.h>
-#include <afs/budb.h>
-#endif
-
-
-/* for ubik_Call_SingleServer */
-
-#define UF_SINGLESERVER         1	/* begin single server operation */
-#define UF_END_SINGLESERVER     2	/* terminate single server operation */
-
-
-/* handle for the ubik database connection */
-
-struct udbHandleS {
-    afs_int32 uh_scIndex;	/* what type of sec. object */
-    struct rx_securityClass *uh_secobj;	/* security object */
-    struct rx_connection *uh_serverConn[MAXSERVERS];	/* server connections */
-    struct ubik_client *uh_client;	/* ubik client handle */
-    afs_uint32 uh_instanceId;	/* instance of client */
-};
-
-typedef struct udbHandleS udbHandleT;
-typedef udbHandleT *udbHandleP;
-
-/* suggested text block management structure */
-
-struct udbClientTextS {
-    char *textName;		/* for info. only */
-    afs_int32 textType;		/* used as key for access */
-    afs_uint32 textVersion;	/* version # for cache mgmt */
-    afs_uint32 lockHandle;	/* for atomicity */
-    afs_int32 textSize;		/* no. of bytes */
-    FILE *textStream;		/* file stream or NULL */
-};
-
-typedef struct udbClientTextS udbClientTextT;
-typedef udbClientTextT *udbClientTextP;
-
-#endif
diff --git a/src/budb/database.h b/src/budb/database.h
index fdb3da5..3b8f671 100644
--- a/src/budb/database.h
+++ b/src/budb/database.h
@@ -293,9 +293,11 @@ struct memoryDB {		/* in core copies of database structures */
 extern struct memoryDB db;
 
 #define set_header_word(ut,field,value) \
-    dbwrite ((ut), (offsetof(struct dbHeader, field)), \
-	     ((db.h.field = (value)), (char *)&(db.h.field)), \
-	     sizeof(afs_int32))
+	( \
+	    (db.h.field) = (value), \
+	    dbwrite((ut), ((char *)&(db.h.field) - (char *)&db.h), \
+		    ((char *)&(db.h.field)), sizeof(afs_int32)) \
+	)
 
 #define set_word_offset(ut,a,b,offset,value) 			      \
     dbwrite ((ut), (a)+(offset),				      \
diff --git a/src/budb/procs.c b/src/budb/procs.c
index 8cf051e..51f3102 100644
--- a/src/budb/procs.c
+++ b/src/budb/procs.c
@@ -1487,7 +1487,7 @@ CreateDump(struct rx_call *call, struct budb_dumpEntry *dump)
 	dump->created = dump->id;
     d.created = htonl(dump->created);
 
-    principal = d.dumper;
+    d.dumper = principal;
     tapeSet_hton(&dump->tapes, &d.tapes);
 
     d.flags = htonl(dump->flags | BUDB_DUMP_INPROGRESS);
diff --git a/src/budb/server.c b/src/budb/server.c
index e5cb460..94a37ac 100644
--- a/src/budb/server.c
+++ b/src/budb/server.c
@@ -494,6 +494,11 @@ main(int argc, char **argv)
 
 	code = afsconf_GetExtendedCellInfo (BU_conf, lcell, 0, &cellinfo,
 					    clones);
+	if (code) {
+	    LogError(0, "Can't read cell information\n");
+	    ERROR(code);
+	}
+
 	code =
 	    convert_cell_to_ubik(&cellinfo, &globalConfPtr->myHost,
 				 globalConfPtr->serverList);
@@ -547,6 +552,9 @@ main(int argc, char **argv)
 	}
     }
 
+    /* Disable jumbograms */
+    rx_SetNoJumbo();
+
     code = ubik_ServerInitByInfo (globalConfPtr->myHost,
 				  htons(AFSCONF_BUDBPORT),
 				  &cellinfo,
@@ -563,9 +571,6 @@ main(int argc, char **argv)
     afsconf_BuildServerSecurityObjects(BU_conf, 0,
 				       &securityClasses, &numClasses);
 
-    /* Disable jumbograms */
-    rx_SetNoJumbo();
-
     tservice =
 	rx_NewServiceHost(host, 0, BUDB_SERVICE, "BackupDatabase",
 			  securityClasses, numClasses, BUDB_ExecuteRequest);
diff --git a/src/butc/tcmain.c b/src/butc/tcmain.c
index bdfb980..2c4154d 100644
--- a/src/butc/tcmain.c
+++ b/src/butc/tcmain.c
@@ -831,11 +831,20 @@ GetConfigParams(char *filename, afs_int32 port)
     return (code);
 }
 
+#ifdef xbsa
+static void
+xbsa_shutdown(int x)
+{
+    xbsa_Finalize(&butxInfo);
+    exit(0);
+}
+#endif
+
 static int
 WorkerBee(struct cmd_syndesc *as, void *arock)
 {
     afs_int32 code;
-    struct rx_securityClass *(securityObjects[3]);
+    struct rx_securityClass *(securityObjects[1]);
     struct rx_service *service;
     time_t tokenExpires;
     char cellName[64];
@@ -1019,6 +1028,8 @@ WorkerBee(struct cmd_syndesc *as, void *arock)
 	rc = InitToServer(0 /*taskid */ , &butxInfo, adsmServerName);
 	if (rc != XBSA_SUCCESS)
 	    return (1);
+	(void)signal(SIGINT, xbsa_shutdown);
+	(void)signal(SIGHUP, xbsa_shutdown);
     }
 #endif /*xbsa */
 
@@ -1084,14 +1095,13 @@ WorkerBee(struct cmd_syndesc *as, void *arock)
      */
 
     securityObjects[0] = rxnull_NewServerSecurityObject();
-    securityObjects[1] = (struct rx_securityClass *)0;	/* don't bother with rxvab */
     if (!securityObjects[0]) {
 	TLog(0, "rxnull_NewServerSecurityObject");
 	exit(1);
     }
 
     service =
-	rx_NewServiceHost(host, 0, 1, "BUTC", securityObjects, 3, TC_ExecuteRequest);
+	rx_NewServiceHost(host, 0, 1, "BUTC", securityObjects, 1, TC_ExecuteRequest);
     if (!service) {
 	TLog(0, "rx_NewService");
 	exit(1);
diff --git a/src/butc/tcudbprocs.c b/src/butc/tcudbprocs.c
index a31652d..bab5b88 100644
--- a/src/butc/tcudbprocs.c
+++ b/src/butc/tcudbprocs.c
@@ -511,7 +511,11 @@ writeDbDump(struct butm_tapeInfo *tapeInfoPtr, afs_uint32 taskId,
 		    LWP_CreateProcess(KeepAlive, 16384, 1, (void *)NULL,
 				      "Keep-alive process", &alivePid);
 #endif
-		/* XXX should we check code here ??? XXX */
+		if (code) {
+		    ErrorLog(0, taskId, code, 0,
+			     "Failed to create keep alive process\n");
+		    ERROR_EXIT(code);
+		}
 	    }
 	    firstcall = 0;
 
diff --git a/src/butm/file_tm.c b/src/butm/file_tm.c
index ecc21bf..d707510 100644
--- a/src/butm/file_tm.c
+++ b/src/butm/file_tm.c
@@ -998,14 +998,15 @@ file_Mount(struct butm_tapeInfo *info, char *tape)
     int xflags;
     afs_int32 code = 0, error = 0, rc = 0;
 
+    if (!info || !tape)
+	ERROR_EXIT(BUTM_BADARGUMENT);
+
     if (info->debug)
 	printf("butm: Mount tape drive\n");
 
     POLL();
     info->error = 0;
 
-    if (!info || !tape)
-	ERROR_EXIT(BUTM_BADARGUMENT);
     if (info->structVersion != BUTM_MAJORVERSION)
 	ERROR_EXIT(BUTM_OLDINTERFACE);
     if (info->tmRock)
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index fc0149f..d5c2860 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -1,3 +1,17 @@
+
+AC_DEFUN([LINUX_AIO_NONVECTOR],
+ [AC_CHECK_LINUX_BUILD([for non-vectorized aio kernel functions],
+                       [ac_cv_linux_aio_nonvector],
+                       [#include <linux/fs.h>],
+                       [extern ssize_t
+                        generic_file_aio_read(struct kiocb *, char __user *,
+                                              size_t, loff_t);],
+                       [LINUX_HAS_NONVECTOR_AIO],
+                       [define if kernel functions like generic_file_aio_read use
+                        non-vectorized i/o],
+                       [])
+ ])
+
 AC_DEFUN([LINUX_EXPORTS_TASKLIST_LOCK], [
   AC_CHECK_LINUX_BUILD([for exported tasklist_lock],
 		       [ac_cv_linux_exports_tasklist_lock],
@@ -714,6 +728,21 @@ AC_DEFUN([LINUX_D_ALIAS_IS_HLIST], [
 ])
 
 
+AC_DEFUN([LINUX_HLIST_ITERATOR_NO_NODE], [
+  AC_CHECK_LINUX_BUILD([whether hlist iterators don't need a node parameter],
+			[ac_cv_linux_hlist_takes_no_node],
+			[#include <linux/list.h>
+			#include <linux/fs.h>],
+			[struct dentry *d = NULL, *cur;
+			struct inode *ip;
+			hlist_for_each_entry(cur, &ip->i_dentry, d_alias) { }
+			],
+			[HLIST_ITERATOR_NO_NODE],
+			[define if hlist iterators don't need a node parameter],
+			[])
+])
+
+
 AC_DEFUN([LINUX_IOP_I_CREATE_TAKES_BOOL], [
   AC_CHECK_LINUX_BUILD([whether inode_operations.create takes a bool],
 			[ac_cv_linux_func_i_create_takes_bool],
diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4
index 0c2faff..4eff08e 100644
--- a/src/cf/osconf.m4
+++ b/src/cf/osconf.m4
@@ -258,8 +258,11 @@ case $AFS_SYSNAME in
 		PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
 		SHLIB_LDFLAGS="-shared -Xlinker -x"
 		SHLIB_CFLAGS="-fPIC"
-		XCFLAGS="-D_LARGEFILE64_SOURCE -fPIC"
+		XCFLAGS="-D_LARGEFILE64_SOURCE -fPIC -m64"
 		SHLIB_LINKER="${MT_CC} -shared"
+		SHLIB_LINKER="${MT_CC} -shared -m64"
+		XLDFLAGS="-m64"
+		ASFLAGS="-a64"
 		;;
 
 	i386_linux*)
@@ -831,6 +834,7 @@ AC_SUBST(AIX32)
 AC_SUBST(AIX64)
 AC_SUBST(AR)
 AC_SUBST(AS)
+AC_SUBST(ASFLAGS)
 AC_SUBST(CP)
 AC_SUBST(DBG)
 AC_SUBST(FSINCLUDES)
diff --git a/src/config/Makefile.config.in b/src/config/Makefile.config.in
index 5a6ea7c..22077a4 100644
--- a/src/config/Makefile.config.in
+++ b/src/config/Makefile.config.in
@@ -32,6 +32,7 @@ viceetcdir=@viceetcdir@
 #
 AR = @AR@
 AS = @AS@
+ASFLAGS = @ASFLAGS@
 AFSD_LIBS = @AFSD_LIBS@
 AFSD_LDFLAGS = @AFSD_LDFLAGS@
 CC = @CC@
diff --git a/src/config/NTMakefile.amd64_w2k b/src/config/NTMakefile.amd64_w2k
index 94f6c84..38edba1 100644
--- a/src/config/NTMakefile.amd64_w2k
+++ b/src/config/NTMakefile.amd64_w2k
@@ -90,7 +90,7 @@ AFSPRODUCT_VER_MAJOR=1
 AFSPRODUCT_VER_MINOR=6
 !ENDIF
 !IF !DEFINED(AFSPRODUCT_VER_PATCH)
-AFSPRODUCT_VER_PATCH=0205
+AFSPRODUCT_VER_PATCH=0400
 !ENDIF
 !IF !DEFINED(AFSPRODUCT_VER_BUILD)
 AFSPRODUCT_VER_BUILD=0
diff --git a/src/config/NTMakefile.i386_nt40 b/src/config/NTMakefile.i386_nt40
index db96e4b..a85198c 100644
--- a/src/config/NTMakefile.i386_nt40
+++ b/src/config/NTMakefile.i386_nt40
@@ -90,7 +90,7 @@ AFSPRODUCT_VER_MAJOR=1
 AFSPRODUCT_VER_MINOR=6
 !ENDIF
 !IF !DEFINED(AFSPRODUCT_VER_PATCH)
-AFSPRODUCT_VER_PATCH=0205
+AFSPRODUCT_VER_PATCH=0400
 !ENDIF
 !IF !DEFINED(AFSPRODUCT_VER_BUILD)
 AFSPRODUCT_VER_BUILD=0
diff --git a/src/config/NTMakefile.i386_w2k b/src/config/NTMakefile.i386_w2k
index d0e0600..309bb63 100644
--- a/src/config/NTMakefile.i386_w2k
+++ b/src/config/NTMakefile.i386_w2k
@@ -94,7 +94,7 @@ AFSPRODUCT_VER_MAJOR=1
 AFSPRODUCT_VER_MINOR=6
 !ENDIF
 !IF !DEFINED(AFSPRODUCT_VER_PATCH)
-AFSPRODUCT_VER_PATCH=0205
+AFSPRODUCT_VER_PATCH=0400
 !ENDIF
 !IF !DEFINED(AFSPRODUCT_VER_BUILD)
 AFSPRODUCT_VER_BUILD=0
diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h
index 1768ed2..060795b 100644
--- a/src/config/afs_sysnames.h
+++ b/src/config/afs_sysnames.h
@@ -276,6 +276,11 @@
 #define SYS_NAME_ID_i386_obsd46         2615
 #define SYS_NAME_ID_i386_obsd47         2616
 #define SYS_NAME_ID_i386_obsd48         2617
+#define SYS_NAME_ID_i386_obsd49         2618
+#define SYS_NAME_ID_i386_obsd50         2619
+#define SYS_NAME_ID_i386_obsd51         2620
+#define SYS_NAME_ID_i386_obsd52         2621
+#define SYS_NAME_ID_i386_obsd53         2622
 
 #define SYS_NAME_ID_amd64_linux2        2700
 #define SYS_NAME_ID_amd64_linux22       2701
@@ -336,6 +341,11 @@
 #define SYS_NAME_ID_amd64_obsd46        4015
 #define SYS_NAME_ID_amd64_obsd47        4016
 #define SYS_NAME_ID_amd64_obsd48        4017
+#define SYS_NAME_ID_amd64_obsd49        4018
+#define SYS_NAME_ID_amd64_obsd50        4019
+#define SYS_NAME_ID_amd64_obsd51        4020
+#define SYS_NAME_ID_amd64_obsd52        4021
+#define SYS_NAME_ID_amd64_obsd53        4022
 
 /*
  * Placeholder to keep system-wide standard flags since this file is included by all
diff --git a/src/config/param.amd64_obsd49.h b/src/config/param.amd64_obsd49.h
new file mode 100644
index 0000000..1760f5c
--- /dev/null
+++ b/src/config/param.amd64_obsd49.h
@@ -0,0 +1,19 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_AMD64_PARAM_H
+#define	AFS_AMD64_PARAM_H
+
+#define SYS_NAME		"amd64_obsd49"
+#define SYS_NAME_ID		SYS_NAME_ID_amd64_obsd49
+
+#define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV	1
+#define AFS_X86_ENV	        1
+#define AFS_64BITPOINTER_ENV    1
+#define AFS_64BITUSERPOINTER_ENV	1
+#define AFSLITTLE_ENDIAN	1
+
+#endif /* AFS_AMD64_PARAM_H */
diff --git a/src/config/param.amd64_obsd50.h b/src/config/param.amd64_obsd50.h
new file mode 100644
index 0000000..ab6b74b
--- /dev/null
+++ b/src/config/param.amd64_obsd50.h
@@ -0,0 +1,19 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_AMD64_PARAM_H
+#define	AFS_AMD64_PARAM_H
+
+#define SYS_NAME		"amd64_obsd50"
+#define SYS_NAME_ID		SYS_NAME_ID_amd64_obsd50
+
+#define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV	1
+#define AFS_X86_ENV	        1
+#define AFS_64BITPOINTER_ENV    1
+#define AFS_64BITUSERPOINTER_ENV	1
+#define AFSLITTLE_ENDIAN	1
+
+#endif /* AFS_AMD64_PARAM_H */
diff --git a/src/config/param.amd64_obsd51.h b/src/config/param.amd64_obsd51.h
new file mode 100644
index 0000000..4e03954
--- /dev/null
+++ b/src/config/param.amd64_obsd51.h
@@ -0,0 +1,19 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_AMD64_PARAM_H
+#define	AFS_AMD64_PARAM_H
+
+#define SYS_NAME		"amd64_obsd51"
+#define SYS_NAME_ID		SYS_NAME_ID_amd64_obsd51
+
+#define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV	1
+#define AFS_X86_ENV	        1
+#define AFS_64BITPOINTER_ENV    1
+#define AFS_64BITUSERPOINTER_ENV	1
+#define AFSLITTLE_ENDIAN	1
+
+#endif /* AFS_AMD64_PARAM_H */
diff --git a/src/config/param.amd64_obsd52.h b/src/config/param.amd64_obsd52.h
new file mode 100644
index 0000000..868f49b
--- /dev/null
+++ b/src/config/param.amd64_obsd52.h
@@ -0,0 +1,19 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_AMD64_PARAM_H
+#define	AFS_AMD64_PARAM_H
+
+#define SYS_NAME		"amd64_obsd52"
+#define SYS_NAME_ID		SYS_NAME_ID_amd64_obsd52
+
+#define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV	1
+#define AFS_X86_ENV	        1
+#define AFS_64BITPOINTER_ENV    1
+#define AFS_64BITUSERPOINTER_ENV	1
+#define AFSLITTLE_ENDIAN	1
+
+#endif /* AFS_AMD64_PARAM_H */
diff --git a/src/config/param.amd64_obsd53.h b/src/config/param.amd64_obsd53.h
new file mode 100644
index 0000000..42da77e
--- /dev/null
+++ b/src/config/param.amd64_obsd53.h
@@ -0,0 +1,19 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_AMD64_PARAM_H
+#define	AFS_AMD64_PARAM_H
+
+#define SYS_NAME		"amd64_obsd53"
+#define SYS_NAME_ID		SYS_NAME_ID_amd64_obsd53
+
+#define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+#define AFS_X86_XBSD_ENV	1
+#define AFS_X86_ENV	        1
+#define AFS_64BITPOINTER_ENV    1
+#define AFS_64BITUSERPOINTER_ENV	1
+#define AFSLITTLE_ENDIAN	1
+
+#endif /* AFS_AMD64_PARAM_H */
diff --git a/src/config/param.i386_obsd49.h b/src/config/param.i386_obsd49.h
new file mode 100644
index 0000000..fd0203c
--- /dev/null
+++ b/src/config/param.i386_obsd49.h
@@ -0,0 +1,25 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_I386_PARAM_H
+#define	AFS_I386_PARAM_H
+
+#define SYS_NAME		"i386_obsd49"
+#define SYS_NAME_ID		SYS_NAME_ID_i386_obsd49
+
+#define AFS_X86_XBSD_ENV	1
+#define AFS_X86_ENV	        1
+#define AFSLITTLE_ENDIAN	1
+
+#ifdef _KERNEL
+void bcopy(const void *, void *, size_t);
+
+static inline void *memmove(void *dst, const void *src, size_t len) {
+    bcopy(src, dst, len);
+    return(dst);
+}
+#endif
+
+#endif /* AFS_I386_PARAM_H */
diff --git a/src/config/param.i386_obsd50.h b/src/config/param.i386_obsd50.h
new file mode 100644
index 0000000..0dffd46
--- /dev/null
+++ b/src/config/param.i386_obsd50.h
@@ -0,0 +1,25 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_I386_PARAM_H
+#define	AFS_I386_PARAM_H
+
+#define SYS_NAME		"i386_obsd50"
+#define SYS_NAME_ID		SYS_NAME_ID_i386_obsd50
+
+#define AFS_X86_XBSD_ENV	1
+#define AFS_X86_ENV	        1
+#define AFSLITTLE_ENDIAN	1
+
+#ifdef _KERNEL
+void bcopy(const void *, void *, size_t);
+
+static inline void *memmove(void *dst, const void *src, size_t len) {
+    bcopy(src, dst, len);
+    return(dst);
+}
+#endif
+
+#endif /* AFS_I386_PARAM_H */
diff --git a/src/config/param.i386_obsd51.h b/src/config/param.i386_obsd51.h
new file mode 100644
index 0000000..621108a
--- /dev/null
+++ b/src/config/param.i386_obsd51.h
@@ -0,0 +1,25 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_I386_PARAM_H
+#define	AFS_I386_PARAM_H
+
+#define SYS_NAME		"i386_obsd51"
+#define SYS_NAME_ID		SYS_NAME_ID_i386_obsd51
+
+#define AFS_X86_XBSD_ENV	1
+#define AFS_X86_ENV	        1
+#define AFSLITTLE_ENDIAN	1
+
+#ifdef _KERNEL
+void bcopy(const void *, void *, size_t);
+
+static inline void *memmove(void *dst, const void *src, size_t len) {
+    bcopy(src, dst, len);
+    return(dst);
+}
+#endif
+
+#endif /* AFS_I386_PARAM_H */
diff --git a/src/config/param.i386_obsd52.h b/src/config/param.i386_obsd52.h
new file mode 100644
index 0000000..0436546
--- /dev/null
+++ b/src/config/param.i386_obsd52.h
@@ -0,0 +1,25 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_I386_PARAM_H
+#define	AFS_I386_PARAM_H
+
+#define SYS_NAME		"i386_obsd52"
+#define SYS_NAME_ID		SYS_NAME_ID_i386_obsd52
+
+#define AFS_X86_XBSD_ENV	1
+#define AFS_X86_ENV	        1
+#define AFSLITTLE_ENDIAN	1
+
+#ifdef _KERNEL
+void bcopy(const void *, void *, size_t);
+
+static inline void *memmove(void *dst, const void *src, size_t len) {
+    bcopy(src, dst, len);
+    return(dst);
+}
+#endif
+
+#endif /* AFS_I386_PARAM_H */
diff --git a/src/config/param.i386_obsd53.h b/src/config/param.i386_obsd53.h
new file mode 100644
index 0000000..354be47
--- /dev/null
+++ b/src/config/param.i386_obsd53.h
@@ -0,0 +1,25 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_I386_PARAM_H
+#define	AFS_I386_PARAM_H
+
+#define SYS_NAME		"i386_obsd53"
+#define SYS_NAME_ID		SYS_NAME_ID_i386_obsd53
+
+#define AFS_X86_XBSD_ENV	1
+#define AFS_X86_ENV	        1
+#define AFSLITTLE_ENDIAN	1
+
+#ifdef _KERNEL
+void bcopy(const void *, void *, size_t);
+
+static inline void *memmove(void *dst, const void *src, size_t len) {
+    bcopy(src, dst, len);
+    return(dst);
+}
+#endif
+
+#endif /* AFS_I386_PARAM_H */
diff --git a/src/config/param.obsd49.h b/src/config/param.obsd49.h
new file mode 100644
index 0000000..be4e889
--- /dev/null
+++ b/src/config/param.obsd49.h
@@ -0,0 +1,83 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_PARAM_H
+#define	AFS_PARAM_H
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+
+#define AFS_NAMEI_ENV		1	/* User space interface to file system */
+#define AFS_64BIT_ENV		1
+#define AFS_64BIT_CLIENT	1
+#define AFS_64BIT_IOPS_ENV	1	/* Needed for NAMEI */
+
+#define AFS_OBSD_ENV		1
+#define	AFS_OBSD31_ENV		1
+#define	AFS_OBSD32_ENV		1
+#define	AFS_OBSD33_ENV		1
+#define AFS_OBSD34_ENV		1
+#define AFS_OBSD35_ENV		1
+#define AFS_OBSD36_ENV		1
+#define AFS_OBSD37_ENV		1
+#define AFS_OBSD38_ENV		1
+#define AFS_OBSD39_ENV		1
+#define AFS_OBSD40_ENV		1
+#define AFS_OBSD41_ENV		1
+#define AFS_OBSD42_ENV		1
+#define AFS_OBSD43_ENV		1
+#define AFS_OBSD44_ENV		1
+#define AFS_OBSD45_ENV		1
+#define AFS_OBSD46_ENV          1
+#define AFS_OBSD47_ENV          1
+#define AFS_OBSD48_ENV          1
+#define AFS_OBSD49_ENV          1
+#undef  AFS_NONFSTRANS
+#define AFS_NONFSTRANS		1
+#define AFS_VM_RDWR_ENV		1
+#define AFS_VFS_ENV		1
+#define AFS_VFSINCL_ENV		1
+
+#define FTRUNC O_TRUNC
+
+#define AFS_SYSCALL		208
+#define AFS_MOUNT_AFS		"afs"
+
+#define RXK_LISTENER_ENV	1
+#define AFS_GCPAGS	        0	/* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY    1	/* use gettimeofday to implement rx clock */
+
+#ifndef IGNORE_STDS_H
+#include <afs/afs_sysnames.h>
+#endif
+
+#ifndef TAILQ_ENTRY
+#include <sys/queue.h>
+#endif
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#ifdef MULTIPROCESSOR
+#define AFS_GLOBAL_SUNLOCK	1
+#endif
+#define	AFS_SHORTGID		0	/* are group id's short? */
+
+#if	!defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#endif /* AFS_PARAM_H */
diff --git a/src/config/param.obsd50.h b/src/config/param.obsd50.h
new file mode 100644
index 0000000..c67fecf
--- /dev/null
+++ b/src/config/param.obsd50.h
@@ -0,0 +1,84 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_PARAM_H
+#define	AFS_PARAM_H
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+
+#define AFS_NAMEI_ENV		1	/* User space interface to file system */
+#define AFS_64BIT_ENV		1
+#define AFS_64BIT_CLIENT	1
+#define AFS_64BIT_IOPS_ENV	1	/* Needed for NAMEI */
+
+#define AFS_OBSD_ENV		1
+#define	AFS_OBSD31_ENV		1
+#define	AFS_OBSD32_ENV		1
+#define	AFS_OBSD33_ENV		1
+#define AFS_OBSD34_ENV		1
+#define AFS_OBSD35_ENV		1
+#define AFS_OBSD36_ENV		1
+#define AFS_OBSD37_ENV		1
+#define AFS_OBSD38_ENV		1
+#define AFS_OBSD39_ENV		1
+#define AFS_OBSD40_ENV		1
+#define AFS_OBSD41_ENV		1
+#define AFS_OBSD42_ENV		1
+#define AFS_OBSD43_ENV		1
+#define AFS_OBSD44_ENV		1
+#define AFS_OBSD45_ENV		1
+#define AFS_OBSD46_ENV          1
+#define AFS_OBSD47_ENV          1
+#define AFS_OBSD48_ENV          1
+#define AFS_OBSD49_ENV          1
+#define AFS_OBSD50_ENV          1
+#undef  AFS_NONFSTRANS
+#define AFS_NONFSTRANS		1
+#define AFS_VM_RDWR_ENV		1
+#define AFS_VFS_ENV		1
+#define AFS_VFSINCL_ENV		1
+
+#define FTRUNC O_TRUNC
+
+#define AFS_SYSCALL		208
+#define AFS_MOUNT_AFS		"afs"
+
+#define RXK_LISTENER_ENV	1
+#define AFS_GCPAGS	        0	/* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY    1	/* use gettimeofday to implement rx clock */
+
+#ifndef IGNORE_STDS_H
+#include <afs/afs_sysnames.h>
+#endif
+
+#ifndef TAILQ_ENTRY
+#include <sys/queue.h>
+#endif
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#ifdef MULTIPROCESSOR
+#define AFS_GLOBAL_SUNLOCK	1
+#endif
+#define	AFS_SHORTGID		0	/* are group id's short? */
+
+#if	!defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#endif /* AFS_PARAM_H */
diff --git a/src/config/param.obsd51.h b/src/config/param.obsd51.h
new file mode 100644
index 0000000..ca21f97
--- /dev/null
+++ b/src/config/param.obsd51.h
@@ -0,0 +1,85 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_PARAM_H
+#define	AFS_PARAM_H
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+
+#define AFS_NAMEI_ENV		1	/* User space interface to file system */
+#define AFS_64BIT_ENV		1
+#define AFS_64BIT_CLIENT	1
+#define AFS_64BIT_IOPS_ENV	1	/* Needed for NAMEI */
+
+#define AFS_OBSD_ENV		1
+#define	AFS_OBSD31_ENV		1
+#define	AFS_OBSD32_ENV		1
+#define	AFS_OBSD33_ENV		1
+#define AFS_OBSD34_ENV		1
+#define AFS_OBSD35_ENV		1
+#define AFS_OBSD36_ENV		1
+#define AFS_OBSD37_ENV		1
+#define AFS_OBSD38_ENV		1
+#define AFS_OBSD39_ENV		1
+#define AFS_OBSD40_ENV		1
+#define AFS_OBSD41_ENV		1
+#define AFS_OBSD42_ENV		1
+#define AFS_OBSD43_ENV		1
+#define AFS_OBSD44_ENV		1
+#define AFS_OBSD45_ENV		1
+#define AFS_OBSD46_ENV          1
+#define AFS_OBSD47_ENV          1
+#define AFS_OBSD48_ENV          1
+#define AFS_OBSD49_ENV          1
+#define AFS_OBSD50_ENV          1
+#define AFS_OBSD51_ENV          1
+#undef  AFS_NONFSTRANS
+#define AFS_NONFSTRANS		1
+#define AFS_VM_RDWR_ENV		1
+#define AFS_VFS_ENV		1
+#define AFS_VFSINCL_ENV		1
+
+#define FTRUNC O_TRUNC
+
+#define AFS_SYSCALL		208
+#define AFS_MOUNT_AFS		"afs"
+
+#define RXK_LISTENER_ENV	1
+#define AFS_GCPAGS	        0	/* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY    1	/* use gettimeofday to implement rx clock */
+
+#ifndef IGNORE_STDS_H
+#include <afs/afs_sysnames.h>
+#endif
+
+#ifndef TAILQ_ENTRY
+#include <sys/queue.h>
+#endif
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#ifdef MULTIPROCESSOR
+#define AFS_GLOBAL_SUNLOCK	1
+#endif
+#define	AFS_SHORTGID		0	/* are group id's short? */
+
+#if	!defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#endif /* AFS_PARAM_H */
diff --git a/src/config/param.obsd52.h b/src/config/param.obsd52.h
new file mode 100644
index 0000000..c95f992
--- /dev/null
+++ b/src/config/param.obsd52.h
@@ -0,0 +1,86 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_PARAM_H
+#define	AFS_PARAM_H
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+
+#define AFS_NAMEI_ENV		1	/* User space interface to file system */
+#define AFS_64BIT_ENV		1
+#define AFS_64BIT_CLIENT	1
+#define AFS_64BIT_IOPS_ENV	1	/* Needed for NAMEI */
+
+#define AFS_OBSD_ENV		1
+#define	AFS_OBSD31_ENV		1
+#define	AFS_OBSD32_ENV		1
+#define	AFS_OBSD33_ENV		1
+#define AFS_OBSD34_ENV		1
+#define AFS_OBSD35_ENV		1
+#define AFS_OBSD36_ENV		1
+#define AFS_OBSD37_ENV		1
+#define AFS_OBSD38_ENV		1
+#define AFS_OBSD39_ENV		1
+#define AFS_OBSD40_ENV		1
+#define AFS_OBSD41_ENV		1
+#define AFS_OBSD42_ENV		1
+#define AFS_OBSD43_ENV		1
+#define AFS_OBSD44_ENV		1
+#define AFS_OBSD45_ENV		1
+#define AFS_OBSD46_ENV          1
+#define AFS_OBSD47_ENV          1
+#define AFS_OBSD48_ENV          1
+#define AFS_OBSD49_ENV          1
+#define AFS_OBSD50_ENV          1
+#define AFS_OBSD51_ENV          1
+#define AFS_OBSD52_ENV          1
+#undef  AFS_NONFSTRANS
+#define AFS_NONFSTRANS		1
+#define AFS_VM_RDWR_ENV		1
+#define AFS_VFS_ENV		1
+#define AFS_VFSINCL_ENV		1
+
+#define FTRUNC O_TRUNC
+
+#define AFS_SYSCALL		208
+#define AFS_MOUNT_AFS		"afs"
+
+#define RXK_LISTENER_ENV	1
+#define AFS_GCPAGS	        0	/* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY    1	/* use gettimeofday to implement rx clock */
+
+#ifndef IGNORE_STDS_H
+#include <afs/afs_sysnames.h>
+#endif
+
+#ifndef TAILQ_ENTRY
+#include <sys/queue.h>
+#endif
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#ifdef MULTIPROCESSOR
+#define AFS_GLOBAL_SUNLOCK	1
+#endif
+#define	AFS_SHORTGID		0	/* are group id's short? */
+
+#if	!defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#endif /* AFS_PARAM_H */
diff --git a/src/config/param.obsd53.h b/src/config/param.obsd53.h
new file mode 100644
index 0000000..8a551d2
--- /dev/null
+++ b/src/config/param.obsd53.h
@@ -0,0 +1,87 @@
+/*
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * OpenBSD porting work.
+ */
+
+#ifndef	AFS_PARAM_H
+#define	AFS_PARAM_H
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#endif
+
+#define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+
+#define AFS_NAMEI_ENV		1	/* User space interface to file system */
+#define AFS_64BIT_ENV		1
+#define AFS_64BIT_CLIENT	1
+#define AFS_64BIT_IOPS_ENV	1	/* Needed for NAMEI */
+
+#define AFS_OBSD_ENV		1
+#define	AFS_OBSD31_ENV		1
+#define	AFS_OBSD32_ENV		1
+#define	AFS_OBSD33_ENV		1
+#define AFS_OBSD34_ENV		1
+#define AFS_OBSD35_ENV		1
+#define AFS_OBSD36_ENV		1
+#define AFS_OBSD37_ENV		1
+#define AFS_OBSD38_ENV		1
+#define AFS_OBSD39_ENV		1
+#define AFS_OBSD40_ENV		1
+#define AFS_OBSD41_ENV		1
+#define AFS_OBSD42_ENV		1
+#define AFS_OBSD43_ENV		1
+#define AFS_OBSD44_ENV		1
+#define AFS_OBSD45_ENV		1
+#define AFS_OBSD46_ENV          1
+#define AFS_OBSD47_ENV          1
+#define AFS_OBSD48_ENV          1
+#define AFS_OBSD49_ENV          1
+#define AFS_OBSD50_ENV          1
+#define AFS_OBSD51_ENV          1
+#define AFS_OBSD52_ENV          1
+#define AFS_OBSD53_ENV          1
+#undef  AFS_NONFSTRANS
+#define AFS_NONFSTRANS		1
+#define AFS_VM_RDWR_ENV		1
+#define AFS_VFS_ENV		1
+#define AFS_VFSINCL_ENV		1
+
+#define FTRUNC O_TRUNC
+
+#define AFS_SYSCALL		208
+#define AFS_MOUNT_AFS		"afs"
+
+#define RXK_LISTENER_ENV	1
+#define AFS_GCPAGS	        0	/* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY    1	/* use gettimeofday to implement rx clock */
+
+#ifndef IGNORE_STDS_H
+#include <afs/afs_sysnames.h>
+#endif
+
+#ifndef TAILQ_ENTRY
+#include <sys/queue.h>
+#endif
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#ifdef MULTIPROCESSOR
+#define AFS_GLOBAL_SUNLOCK	1
+#endif
+#define	AFS_SHORTGID		0	/* are group id's short? */
+
+#if	!defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+enum vcexcl { NONEXCL, EXCL };
+
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+#endif /* _KERNEL */
+
+#endif /* AFS_PARAM_H */
diff --git a/src/kauth/kadatabase.c b/src/kauth/kadatabase.c
index 0a9fe9c..3524688 100644
--- a/src/kauth/kadatabase.c
+++ b/src/kauth/kadatabase.c
@@ -32,7 +32,12 @@
 
 extern Date cheaderReadTime;	/* time cheader last read in */
 
-#define set_header_word(tt,field,value) kawrite ((tt), (offsetof(struct kaheader, field)), ((cheader.field = (value)), (char *)&(cheader.field)), sizeof(afs_int32))
+#define set_header_word(tt,field,value) \
+	( \
+	    (cheader.field) = (value), \
+	    kawrite((tt), ((char *)&(cheader.field) - (char *)&cheader), \
+		    (char *)&(cheader.field), sizeof(afs_int32)) \
+	)
 
 #define inc_header_word(tt,field) kawrite ((tt), (offsetof(struct kaheader, field)), ((cheader.field = (htonl(ntohl(cheader.field)+1))), (char *)&(cheader.field)), sizeof(afs_int32))
 
diff --git a/src/kauth/kaserver.c b/src/kauth/kaserver.c
index cc642a5..51d5920 100644
--- a/src/kauth/kaserver.c
+++ b/src/kauth/kaserver.c
@@ -321,9 +321,13 @@ main(int argc, char *argv[])
 	    "Migrating to a Kerberos 5 KDC is advised.  "
 	    "http://www.openafs.org/no-more-des.html\n"));
 
-    code =
-	afsconf_GetExtendedCellInfo(KA_conf, cell, AFSCONF_KAUTHSERVICE,
-				    &cellinfo, clones);
+    code = afsconf_GetExtendedCellInfo(KA_conf, cell, AFSCONF_KAUTHSERVICE,
+				       &cellinfo, clones);
+    if (code) {
+	afs_com_err(whoami, code, "Couldn't read cell configuration");
+	exit(1);
+    }
+
     if (servers) {
 	if ((code = ubik_ParseServerList(argc, argv, &myHost, serverList))) {
 	    afs_com_err(whoami, code, "Couldn't parse server list");
@@ -333,6 +337,11 @@ main(int argc, char *argv[])
 	for (i = 1; i < MAXSERVERS; i++) {
 	    if (!serverList[i])
 		break;
+	    if (i >= MAXHOSTSPERCELL) {
+		fprintf(stderr,
+			"Too many ubik servers specified on command line\n");
+		exit(1);
+	    }
 	    cellinfo.hostAddr[i].sin_addr.s_addr = serverList[i];
 	}
 	cellinfo.numServers = i;
@@ -382,6 +391,9 @@ main(int argc, char *argv[])
 	}
     }
 
+    /* Disable jumbograms */
+    rx_SetNoJumbo();
+
     if (servers)
 	code =
 	    ubik_ServerInit(myHost, htons(AFSCONF_KAUTHPORT), serverList,
@@ -398,9 +410,6 @@ main(int argc, char *argv[])
 
     sca[RX_SCINDEX_NULL] = rxnull_NewServerSecurityObject();
 
-    /* Disable jumbograms */
-    rx_SetNoJumbo();
-
     tservice =
 	rx_NewServiceHost(host, 0, KA_AUTHENTICATION_SERVICE,
 			  "AuthenticationService", sca, 1, KAA_ExecuteRequest);
diff --git a/src/libadmin/bos/afs_bosAdmin.c b/src/libadmin/bos/afs_bosAdmin.c
index 016145a..22ed13e 100644
--- a/src/libadmin/bos/afs_bosAdmin.c
+++ b/src/libadmin/bos/afs_bosAdmin.c
@@ -170,7 +170,7 @@ bos_ServerOpen(const void *cellHandle, const char *serverName,
     int rc = 0;
     afs_status_t tst = 0;
     afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
-    bos_server_p bos_server = (bos_server_p) malloc(sizeof(bos_server_t));
+    bos_server_p bos_server = (bos_server_p) calloc(1, sizeof(bos_server_t));
     int serverAddress;
 
     /*
diff --git a/src/libadmin/vos/vosutils.c b/src/libadmin/vos/vosutils.c
index 4672651..4ac47bf 100644
--- a/src/libadmin/vos/vosutils.c
+++ b/src/libadmin/vos/vosutils.c
@@ -567,8 +567,8 @@ AddressMatch(int addrTest, int addrPattern)
     int bPattern;
 
     /* Test the high byte */
-    bTest = addrTest >> 24;
-    bPattern = addrPattern >> 24;
+    bTest = (addrTest >> 24) & 255;
+    bPattern = (addrPattern >> 24) & 255;
     if ((bTest != bPattern) && (bPattern != 255)) {
 	return FALSE;
     }
diff --git a/src/libafs/.gitignore b/src/libafs/.gitignore
index d87f88a..225e979 100644
--- a/src/libafs/.gitignore
+++ b/src/libafs/.gitignore
@@ -26,3 +26,4 @@
 /rpc
 /sys
 /rx
+/.makelog
diff --git a/src/libafs/MakefileProto.FBSD.in b/src/libafs/MakefileProto.FBSD.in
index 0e682af..efc5f9b 100644
--- a/src/libafs/MakefileProto.FBSD.in
+++ b/src/libafs/MakefileProto.FBSD.in
@@ -71,12 +71,14 @@ setup:
 	ln -fs ../Makefile.common $(KOBJ)/Makefile.common
 	-$(RM) -f  h net netinet rpc ufs nfs  machine sys vm
 	-ln -fs ${KSRC}/net net
-	-ln -fs ${KSRC}/@HOST_CPU@/include machine
+<amd64 i386>
+	-ln -fs ${KSRC}/x86/include machine
+<all>
 	-ln -fs ${KSRC}/netinet netinet
 	-ln -fs ${KSRC}/nfs nfs
-<all -fbsd_71 -fbsd_72 -fbsd_72 -fbsd_73 -fbsd_74 -fbsd_80 -fbsd_81 -fbsd_82 -fbsd_90>
+<fbsd_50 fbsd_51 fbsd_52 fbsd_53 fbsd_60 fbsd_61 fbsd_62 fbsd_70>
 	-ln -fs /usr/include/rpc rpc
-<fbsd_71 fbsd_72 fbsd_73 fbsd_74 fbsd_80 fbsd_81 fbsd_82 fbsd_90>
+<all -fbsd_50 -fbsd_51 -fbsd_52 -fbsd_53 -fbsd_60 -fbsd_61 -fbsd_62 -fbsd_70>
 	-ln -fs ${KSRC}/rpc rpc
 <all>
 	-ln -fs ${KSRC}/sys sys
diff --git a/src/libafs/MakefileProto.LINUX.in b/src/libafs/MakefileProto.LINUX.in
index 63b2f35..e2c96ee 100644
--- a/src/libafs/MakefileProto.LINUX.in
+++ b/src/libafs/MakefileProto.LINUX.in
@@ -19,6 +19,8 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 
+AFS_OS_CLEAN = .makelog
+
 # OS specific object files:
 AFS_OS_OBJS = \
 	osi_alloc.o \
@@ -338,7 +340,13 @@ ${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: ${LINUX_LIBAFS_NAME}.ko
 .FORCE:
 ${LINUX_LIBAFS_NAME}.ko afspag.ko: .FORCE
 	env EXTRA_CFLAGS="${EXTRA_CFLAGS}" @TOP_SRCDIR@/libafs/make_kbuild_makefile.pl ${KDIR} $@ @TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
-	env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_BUILD} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
+	env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_BUILD} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules 2>&1 | tee .makelog
+	@if [ `grep ^WARNING .makelog | wc -l` -ne 0 ]; then \
+		echo Error: Undefined symbols in modules ; \
+		rm .makelog ; \
+		exit 1 ; \
+	fi
+	rm .makelog
 
 <all -linux26 -linux_26 -umlinux26>
 ${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
diff --git a/src/libafsauthent/README b/src/libafsauthent/README
index d7b2b98..1d79c28 100644
--- a/src/libafsauthent/README
+++ b/src/libafsauthent/README
@@ -10,15 +10,15 @@ the kauth and auth library interfaces.  The primary method used to obtain
 thread safety in these libraries is to lock/unlock a recursive global
 mutex at the entry point of every public function in the library.
 
-However, not all public functions are made thread safe since not all 
+However, not all public functions are made thread safe since not all
 functions are needed by the NT admin work.  In particular, there are
-many public functions that make up decendants of the functions
-we wish to use that weren't modified, since these functions will be 
+many public functions that make up descendants of the functions
+we wish to use that weren't modified, since these functions will be
 protected by the locking at a higher level function.
 
-To prevent people from using non-thread safe functions, platform 
-specific methods are used to limit the functions exported by the 
-library (using def files under NT and mapfiles under Solaris).  For 
-most non-exported functions, it should be trivial to make the 
-transformation to thread safe by simply locking/ unlocking the 
+To prevent people from using non-thread safe functions, platform
+specific methods are used to limit the functions exported by the
+library (using def files under NT and mapfiles under Solaris).  For
+most non-exported functions, it should be trivial to make the
+transformation to thread safe by simply locking/ unlocking the
 global mutex at the beginning/end of the function.
diff --git a/src/libafscp/afscp_dir.c b/src/libafscp/afscp_dir.c
index 5233c15..513a783 100644
--- a/src/libafscp/afscp_dir.c
+++ b/src/libafscp/afscp_dir.c
@@ -373,11 +373,8 @@ gettoproot(struct afscp_cell *cell, char *p, char **q,
 	    r = p;
 	    while (*r && *r != '/')
 		r++;
-	    if (!*r && !p) {
-		afscp_errno = ENODEV;
-		return 1;
-	    }
-	    *r++ = 0;
+	    if (*r)
+		*r++ = 0;
 	    *q = r;
 	    afs_dprintf(("gettoproot: dynroot looking up cell %s\n", p));
 	    cell = afscp_CellByName(p, NULL);
diff --git a/src/libafsrpc/Makefile.in b/src/libafsrpc/Makefile.in
index 7db4ab8..54707ca 100644
--- a/src/libafsrpc/Makefile.in
+++ b/src/libafsrpc/Makefile.in
@@ -389,7 +389,7 @@ syscall.o: ${SYS}/syscall.s
 	        ${CC} ${AFS_CFLAGS} -c syscall.c;; \
 	 *) \
 		$(PATH_CPP) ${SFLAGS} ${SYS}/syscall.s > syscall.ss; \
-		as -o syscall.o syscall.ss;		\
+		as $(ASFLAGS) -o syscall.o syscall.ss;		\
 		$(RM) syscall.ss;;				\
 	esac
 
diff --git a/src/libuafs/MakefileProto.FBSD.in b/src/libuafs/MakefileProto.FBSD.in
index ab533d1..642fe6a 100644
--- a/src/libuafs/MakefileProto.FBSD.in
+++ b/src/libuafs/MakefileProto.FBSD.in
@@ -23,9 +23,9 @@ OPTF=-O
 
 TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_FBSD50_ENV $(XCFLAGS)
 TEST_LDFLAGS=
-<all -fbsd_62 -fbsd_70 -fbsd_71 -fbsd_72 -fbsd_73 -fbsd_74 -fbsd_80 -fbsd_81 -fbsd_90>
+<fbsd_50 fbsd_51 fbsd_52 fbsd_53 fbsd_60 fbsd_61>
 TEST_LIBS=-lc_r
-<fbsd_62 fbsd_70 fbsd_71 fbsd_72 fbsd_73 fbsd_74 fbsd_80 fbsd_81 fbsd_82 fbsd_90>
+<all -fbsd_50 -fbsd_51 -fbsd_52 -fbsd_53 -fbsd_60 -fbsd_61>
 TEST_LIBS=-lpthread
 <all>
 
diff --git a/src/libuafs/MakefileProto.LINUX.in b/src/libuafs/MakefileProto.LINUX.in
index fe14f9a..9445119 100644
--- a/src/libuafs/MakefileProto.LINUX.in
+++ b/src/libuafs/MakefileProto.LINUX.in
@@ -31,7 +31,7 @@ CFLAGS+= -I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) $
 OPTF=-O
 # WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
 
-TEST_CFLAGS=-pthread -D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_LINUX22_ENV
+TEST_CFLAGS=-pthread -D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_LINUX22_ENV $(XCFLAGS)
 TEST_LDFLAGS=
 TEST_LIBS=-lpthread
 
diff --git a/src/libuafs/README b/src/libuafs/README
index ca34580..a62281c 100644
--- a/src/libuafs/README
+++ b/src/libuafs/README
@@ -10,34 +10,34 @@ README file for libuafs and libjuafs, Version 1.2 06/04/2003.
 
 ### INTRODUCTION ###
 
-This Makefile generates two libraries, the standard libuafs.a and 
+This Makefile generates two libraries, the standard libuafs.a and
 libjuafs.a, a libuafs.a variant that is designed for use with Java
 enabled applications (as used with libjafsadm, see
 src/JAVA/libjafsadm/JAFSADM_README). The libuafs.a library facilitates
-user authentication at a process level and enables access and 
-manipulation of the files and access control lists (ACLs).  By way of 
-the libuafs.a klog function (uafs_klog), the authenticated user's 
-credentials are bound to the executing process and therefore is granted 
+user authentication at a process level and enables access and
+manipulation of the files and access control lists (ACLs).  By way of
+the libuafs.a klog function (uafs_klog), the authenticated user's
+credentials are bound to the executing process and therefore is granted
 permission to act on behalf of the authenticated user.
 
 
 ### LIBUAFS ###
 
-As of 05/13/2002 the libuafs.a library remains unchanged with respect 
+As of 05/13/2002 the libuafs.a library remains unchanged with respect
 to OpenAFS release 1.2.3.
 
 
 ### LIBJUAFS ###
 
-The libjuafs.a is a new addition to the libuafs.a build as of 05/10/2002 and has 
+The libjuafs.a is a new addition to the libuafs.a build as of 05/10/2002 and has
 been added for the following reasons:
 
 - To avoid function name collisions with other libraries
 - To ensure that existing applications using libuafs.a will not be affected.
 - Utilize libuafs.a functionality in Java-based applications.
 
-The libjuafs.a library implements the AFS_WEB_ENHANCEMENTS and UKERNEL 
-(user space kernel) definitions, which are used to enable functions 
+The libjuafs.a library implements the AFS_WEB_ENHANCEMENTS and UKERNEL
+(user space kernel) definitions, which are used to enable functions
 such as:
 
 - afs_setpag_val*
@@ -57,7 +57,7 @@ for the thread to restore tokens, rather than reauthenticating.
 
 ### BUILD ###
 
-A simple "make" will build both libuafs.a and libjuafs.a.  Optionally, you 
+A simple "make" will build both libuafs.a and libjuafs.a.  Optionally, you
 can make each library independently by issuing:
 
   make UAFS/libuafs.a
@@ -71,11 +71,11 @@ can make each library independently by issuing:
 
 The libuafs/UAFS directory is generated by the Makefile and contains the
 object files and local copy of libuafs.a resulting from the build process.
-The libuafs/JUAFS directory is the same as libuafs/UAFS, however it 
+The libuafs/JUAFS directory is the same as libuafs/UAFS, however it
 contains output files respective to libjuafs.a.
 
 
 ### CONSIDERATIONS ###
 
-The libjuafs.a library has only been tested using RedHat Linux 7.3 and 
+The libjuafs.a library has only been tested using RedHat Linux 7.3 and
 OpenAFS 1.2.6, OpenAFS 1.2.7, OpenAFS 1.2.8, and OpenAFS 1.2.9.
diff --git a/src/log/unlog.c b/src/log/unlog.c
index 3542e7f..255917b 100644
--- a/src/log/unlog.c
+++ b/src/log/unlog.c
@@ -74,7 +74,7 @@ CommandProc(struct cmd_syndesc *as, void *arock)
 
     if (as->parms[0].items) {	/* A cell is provided */
 	for (itp = as->parms[0].items; itp; itp = itp->next) {
-	    if (i > MAXCELLS) {
+	    if (i >= MAXCELLS) {
 		printf
 		    ("The maximum number of cells (%d) is exceeded; the rest are ignored\n",
 		     MAXCELLS);
diff --git a/src/lwp/iomgr.c b/src/lwp/iomgr.c
index 74df517..7774ecf 100644
--- a/src/lwp/iomgr.c
+++ b/src/lwp/iomgr.c
@@ -709,7 +709,7 @@ static int SignalSignals (void)
 	sigProc[i] = 0;
     }
 
-    for (i = 1; i <= NSIG; ++i)  /* forall !badsig(i) */
+    for (i = 1; i < NSIG; ++i)  /* forall !badsig(i) */
 	if ((sigsHandled & mysigmask(i)) && sigDelivered[i] == TRUE) {
 	    sigDelivered[i] = FALSE;
 	    LWP_NoYieldSignal (sigEvents[i]);
diff --git a/src/lwp/lwp.c b/src/lwp/lwp.c
index 0b3f80b..35eb8cf 100644
--- a/src/lwp/lwp.c
+++ b/src/lwp/lwp.c
@@ -418,7 +418,8 @@ LWP_CreateProcess(void *(*ep) (void *), int stacksize, int priority, void *parm,
 	/* End of gross hack */
 
 	Set_LWP_RC();
-	*pid = temp;
+	if (pid)
+	    *pid = temp;
 	return 0;
     } else
 	return LWP_EINIT;
@@ -484,7 +485,8 @@ LWP_CreateProcess2(void *(*ep) (void *), int stacksize, int priority, void *parm
 	/* End of gross hack */
 
 	Set_LWP_RC();
-	*pid = temp;
+	if (pid)
+	    *pid = temp;
 	return 0;
     } else
 	return LWP_EINIT;
@@ -641,7 +643,8 @@ LWP_InitializeProcessSupport(int priority, PROCESS * pid)
     savecontext(Dispatcher, &temp->context, NULL);
     LWPANCHOR.outersp = temp->context.topstack;
     Set_LWP_RC();
-    *pid = temp;
+    if (pid)
+	*pid = temp;
 
     /* get minimum stack size from the environment. this allows the  administrator
      * to change the lwp stack dynamically without getting a new binary version.
@@ -1443,7 +1446,8 @@ LWP_CreateProcess(pthread_startroutine_t ep, int stacksize, int priority,
 	free(lp);
 	return LWP_ENOMEM;
     }
-    *pid = lp;
+    if (pid)
+	*pid = lp;
     return LWP_SUCCESS;
 }
 
@@ -1494,7 +1498,8 @@ LWP_InitializeProcessSupport(int priority, PROCESS * pid)
     int state;
 
     if (initialized) {
-	*pid = lp;
+	if (pid)
+	    *pid = lp;
 	return LWP_SUCCESS;
     }
 #ifndef LWP_NO_PRIORITIES
@@ -1519,7 +1524,8 @@ LWP_InitializeProcessSupport(int priority, PROCESS * pid)
     MUTEX_INIT(&lwp_mutex, "lwp", MUTEX_DEFAULT, 0);
     MUTEX_ENTER(&lwp_mutex);
     initialized = 1;
-    *pid = lp;
+    if (pid)
+	*pid = lp;
     return LWP_SUCCESS;
 }
 
diff --git a/src/mcas/README b/src/mcas/README
index 9ff8b6e..36b24c1 100644
--- a/src/mcas/README
+++ b/src/mcas/README
@@ -85,7 +85,7 @@ The license is GPL. See the file COPYING for details.
 ****
 
 This software has been released by its original author, Keir Fraser,
-with permission from his advisors, under a BSD license.  For details, 
+with permission from his advisors, under a BSD license.  For details,
 please see README.LICENSE.
 
  -- Matt Benjamin, 07/24/2009
diff --git a/src/mcas/README_LICENSE b/src/mcas/README_LICENSE
index 8912f1e..7aa3781 100644
--- a/src/mcas/README_LICENSE
+++ b/src/mcas/README_LICENSE
@@ -1,4 +1,4 @@
-A note on BSD licensing of the software contained herin.
+A note on BSD licensing of the software contained herein.
 
 This software includes software previously released in 2003 under a
 GPL license, but released by the original copyright holder, Keir
diff --git a/src/packaging/Debian/README.source b/src/packaging/Debian/README.source
index c01610e..1f4058a 100644
--- a/src/packaging/Debian/README.source
+++ b/src/packaging/Debian/README.source
@@ -16,7 +16,7 @@ General Maintenance
     review, which makes it very easy for anyone who wishes to submit
     patches for review using Git.  See:
 
-        http://wiki.openafs.org/AFSLore/GitDevelopers/
+        http://wiki.openafs.org/GitDevelopers/
 
     for information on how to submit patches upstream.  There are some
     Debian-specific patches to the upstream source in the 1.4 versions of
diff --git a/src/packaging/README b/src/packaging/README
index 8e45b0a..6bab0f7 100644
--- a/src/packaging/README
+++ b/src/packaging/README
@@ -1,5 +1,5 @@
 Included in this directory are copies of the files used to create OpenAFS
-binary packages. It will be endeavoured to keep them up to date, however,
+binary packages. It will be endeavored to keep them up to date, however,
 the files in the binary packaging system used by the vendor (the debian
 directory as used by Debian or the srpm for RedHat packages) is currently
 canonical. These should be treated as reference material only.
diff --git a/src/platform/DARWIN/AklogAuthPlugin/README b/src/platform/DARWIN/AklogAuthPlugin/README
index 8e66eef..b1b0c79 100644
--- a/src/platform/DARWIN/AklogAuthPlugin/README
+++ b/src/platform/DARWIN/AklogAuthPlugin/README
@@ -46,29 +46,29 @@ int main(int argc, char *argv[])
 
     CFArrayRef arrayRef;
     if (!CFDictionaryGetValueIfPresent(login_dict, CFSTR("mechanisms"),
-    	&arrayRef))
+	&arrayRef))
         exit(1);
 
     CFMutableArrayRef newMechanisms = CFArrayCreateMutableCopy(NULL, 0,
-    	arrayRef);
+	arrayRef);
     if (!newMechanisms)
         exit(1);
 
     CFIndex index = CFArrayGetFirstIndexOfValue(newMechanisms,
-    	CFRangeMake(0, CFArrayGetCount(newMechanisms)), CFSTR("authinternal"));
+	CFRangeMake(0, CFArrayGetCount(newMechanisms)), CFSTR("authinternal"));
 
     if (index == -1)
         exit(1);
 
     CFArraySetValueAtIndex(newMechanisms, index, CFSTR("newmech"));
 
-    CFMutableDictionaryRef new_login_dict 
-    	= CFDictionaryCreateMutableCopy(NULL, 0, login_dict);
+    CFMutableDictionaryRef new_login_dict
+	= CFDictionaryCreateMutableCopy(NULL, 0, login_dict);
 
     CFDictionarySetValue(new_login_dict, CFSTR("mechanisms"), newMechanisms);
 
     status = AuthorizationRightSet(authRef, LOGIN_RIGHT, new_login_dict,
-    	NULL, NULL, NULL);
+	NULL, NULL, NULL);
 
     if (status) exit(1);
 }
diff --git a/src/ptserver/db_verify.c b/src/ptserver/db_verify.c
index 0e76765..a07d04e 100644
--- a/src/ptserver/db_verify.c
+++ b/src/ptserver/db_verify.c
@@ -1486,12 +1486,11 @@ inccount(struct idused **idmapp, int id)
 	idmapp = &idmap->idnext;
     }
     if (!idmap) {
-	idmap = (struct idused *)malloc(sizeof *idmap);
+	idmap = calloc(1, sizeof *idmap);
 	if (!idmap) {
 	    perror("idmap");
 	    exit(1);
 	}
-	memset(idmap, 0, sizeof idmap);
 	idmap->idstart = id & ~(IDCOUNT - 1);
 	idmap->idnext = *idmapp;
 	*idmapp = idmap;
diff --git a/src/ptserver/ptserver.c b/src/ptserver/ptserver.c
index 53925ae..13786c0 100644
--- a/src/ptserver/ptserver.c
+++ b/src/ptserver/ptserver.c
@@ -506,6 +506,13 @@ main(int argc, char **argv)
 	}
     }
 
+    /* Disable jumbograms */
+    rx_SetNoJumbo();
+
+    if (rxMaxMTU != -1) {
+	rx_SetMaxMTU(rxMaxMTU);
+    }
+
     code =
 	ubik_ServerInitByInfo(myHost, htons(AFSCONF_PROTPORT), &info, clones,
 			      pr_dbaseName, &dbase);
@@ -520,13 +527,6 @@ main(int argc, char **argv)
     afsconf_BuildServerSecurityObjects(prdir, 0, &securityClasses,
 				       &numClasses);
 
-    /* Disable jumbograms */
-    rx_SetNoJumbo();
-
-    if (rxMaxMTU != -1) {
-	rx_SetMaxMTU(rxMaxMTU);
-    }
-
     tservice =
 	rx_NewServiceHost(host, 0, PRSRV, "Protection Server", securityClasses,
 		          numClasses, PR_ExecuteRequest);
diff --git a/src/ptserver/ptuser.c b/src/ptserver/ptuser.c
index 538b6dc..fb7aa03 100644
--- a/src/ptserver/ptuser.c
+++ b/src/ptserver/ptuser.c
@@ -623,6 +623,8 @@ pr_ListMembers(char *group, namelist *lnames)
     afs_int32 code;
     afs_int32 gid;
 
+    memset(lnames, 0, sizeof(namelist));
+
     code = pr_SNameToId(group, &gid);
     if (code)
 	return code;
diff --git a/src/ptserver/ptutils.c b/src/ptserver/ptutils.c
index d2548db..9d764fc 100644
--- a/src/ptserver/ptutils.c
+++ b/src/ptserver/ptutils.c
@@ -457,6 +457,8 @@ CreateEntry(struct ubik_trans *at, char aname[PR_MAXNAMELEN], afs_int32 *aid, af
 
 	/* write updated entry for group */
 	code = pr_Write(at, 0, pos, &centry, sizeof(centry));
+	if (code)
+	    return PRDBFAIL;
 
 	/* Now add the new user entry to the database */
 	tentry.creator = creator;
diff --git a/src/ptserver/utils.c b/src/ptserver/utils.c
index 230e760..822df99 100644
--- a/src/ptserver/utils.c
+++ b/src/ptserver/utils.c
@@ -488,6 +488,8 @@ RemoveFromIDHash(struct ubik_trans *tt, afs_int32 aid, afs_int32 *loc)		/* ??? i
 	    return PRDBFAIL;
 	bentry.nextID = tentry.nextID;
 	code = pr_WriteEntry(tt, 0, trail, &bentry);
+	if (code)
+	    return PRDBFAIL;
     }
     *loc = current;
     return PRSUCCESS;
@@ -566,6 +568,8 @@ RemoveFromNameHash(struct ubik_trans *tt, char *aname, afs_int32 *loc)
 	    return PRDBFAIL;
 	bentry.nextName = tentry.nextName;
 	code = pr_WriteEntry(tt, 0, trail, &bentry);
+	if (code)
+	    return PRDBFAIL;
     }
     *loc = current;
     return PRSUCCESS;
diff --git a/src/rx/DARWIN/rx_knet.c b/src/rx/DARWIN/rx_knet.c
index b3aa3a2..9250df8 100644
--- a/src/rx/DARWIN/rx_knet.c
+++ b/src/rx/DARWIN/rx_knet.c
@@ -41,6 +41,9 @@ rx_upcall(socket_t so, void *arg, __unused int waitflag)
     if (rxinit_status)
 	return;
 
+    /* See if a check for additional packets was issued */
+    rx_CheckPackets();
+
     p = rxi_AllocPacket(RX_PACKET_CLASS_RECEIVE);
     rx_computelen(p, tlen);
     rx_SetDataSize(p, tlen);    /* this is the size of the user data area */
diff --git a/src/rx/rx_lwp.c b/src/rx/rx_lwp.c
index 525743e..929c90f 100644
--- a/src/rx/rx_lwp.c
+++ b/src/rx/rx_lwp.c
@@ -434,6 +434,13 @@ rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags)
     fd_set *sfds = (fd_set *) 0;
     while (sendmsg(socket, msg_p, flags) == -1) {
 	int err;
+
+#ifdef AFS_NT40_ENV
+	err = WSAGetLastError();
+#else
+	err = errno;
+#endif
+
 	rx_stats.sendSelects++;
 
 	if (!sfds) {
@@ -449,26 +456,21 @@ rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags)
 	  ;
 #endif
 #ifdef AFS_NT40_ENV
-	if (WSAGetLastError())
+	if (err)
 #elif defined(AFS_LINUX22_ENV)
 	/* linux unfortunately returns ECONNREFUSED if the target port
 	 * is no longer in use */
 	/* and EAGAIN if a UDP checksum is incorrect */
-	if (errno != EWOULDBLOCK && errno != ENOBUFS && errno != ECONNREFUSED
-	    && errno != EAGAIN)
+	if (err != EWOULDBLOCK && err != ENOBUFS && err != ECONNREFUSED
+	    && err != EAGAIN)
 #else
-	if (errno != EWOULDBLOCK && errno != ENOBUFS)
+	if (err != EWOULDBLOCK && err != ENOBUFS)
 #endif
 	{
 	    (osi_Msg "rx failed to send packet: ");
 	    perror("rx_sendmsg");
-#ifndef AFS_NT40_ENV
-            if (errno > 0)
-              return -errno;
-#else
-            if (WSAGetLastError() > 0)
-              return -WSAGetLastError();
-#endif
+            if (err > 0)
+              return -err;
 	    return -1;
 	}
 	while ((err = select(socket + 1, 0, sfds, 0, 0)) != 1) {
diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c
index 89f56da..7ac3a57 100644
--- a/src/rx/rx_packet.c
+++ b/src/rx/rx_packet.c
@@ -2747,6 +2747,7 @@ rxi_PrepareSendPacket(struct rx_call *call,
     afs_uint32 seq = call->tnext++;
     unsigned int i;
     afs_int32 len;		/* len must be a signed type; it can go negative */
+    int code;
 
     /* No data packets on call 0. Where do these come from? */
     if (*call->callNumber == 0)
@@ -2798,7 +2799,20 @@ rxi_PrepareSendPacket(struct rx_call *call,
     if (len)
         p->wirevec[i - 1].iov_len += len;
     MUTEX_ENTER(&call->lock);
-    RXS_PreparePacket(conn->securityObject, call, p);
+    code = RXS_PreparePacket(conn->securityObject, call, p);
+    if (code) {
+	MUTEX_EXIT(&call->lock);
+	rxi_ConnectionError(conn, code);
+	MUTEX_ENTER(&conn->conn_data_lock);
+	p = rxi_SendConnectionAbort(conn, p, 0, 0);
+	MUTEX_EXIT(&conn->conn_data_lock);
+	MUTEX_ENTER(&call->lock);
+	/* setting a connection error means all calls for that conn are also
+	 * error'd. if this call does not have an error by now, something is
+	 * very wrong, and we risk sending data in the clear that is supposed
+	 * to be encrypted. */
+	osi_Assert(call->error);
+    }
 }
 
 /* Given an interface MTU size, calculate an adjusted MTU size that
diff --git a/src/rx/test/rxperf.c b/src/rx/test/rxperf.c
index ffbf0c1..4983905 100644
--- a/src/rx/test/rxperf.c
+++ b/src/rx/test/rxperf.c
@@ -217,16 +217,25 @@ start_timer(void)
  */
 
 static void
-end_and_print_timer(char *str)
+end_and_print_timer(char *str, long long bytes)
 {
     long long start_l, stop_l;
+    double kbps;
 
     timer_check--;
     assert(timer_check == 0);
     gettimeofday(&timer_stop, NULL);
     start_l = timer_start.tv_sec * 1000000 + timer_start.tv_usec;
     stop_l = timer_stop.tv_sec * 1000000 + timer_stop.tv_usec;
-    printf("%s:\t%8llu msec\n", str, (stop_l - start_l) / 1000);
+    printf("%s:\t%8llu msec", str, (stop_l - start_l) / 1000);
+
+    kbps = bytes * 8000.0 / (stop_l - start_l);
+    if (kbps > 1000000.0)
+        printf("\t[%.4g Gbit/s]\n", kbps/1000000.0);
+    else if (kbps > 1000.0)
+        printf("\t[%.4g Mbit/s]\n", kbps/1000.0);
+    else
+        printf("\t[%.4g kbit/s]\n", kbps);
 }
 
 /*
@@ -892,7 +901,17 @@ do_client(const char *server, short port, char *filename, afs_int32 command,
         pthread_join(thread[i], &status);
 #endif
 
-    end_and_print_timer(stamp);
+    switch (command) {
+    case RX_PERF_RPC:
+        end_and_print_timer(stamp, (long long)threads*times*(sendbytes+readbytes));
+        break;
+    case RX_PERF_RECV:
+    case RX_PERF_SEND:
+    case RX_PERF_FILE:
+        end_and_print_timer(stamp, (long long)threads*times*bytes);
+        break;
+    }
+
     DBFPRINT(("done for good\n"));
 
     if (dumpstats) {
diff --git a/src/rxgen/rpc_parse.c b/src/rxgen/rpc_parse.c
index a19ca54..8ce005d 100644
--- a/src/rxgen/rpc_parse.c
+++ b/src/rxgen/rpc_parse.c
@@ -1424,7 +1424,8 @@ ss_ProcParams_setup(definition * defp, int *somefrees)
 		}
 		f_print(fout, "\t%s %s", plist->pl.param_type,
 			plist->pl.param_name);
-		*pntr = pres;
+		if (pntr)
+		    *pntr = pres;
 	    } else if (strchr(plist->pl.param_type, '*') == 0) {
 		f_print(fout, "\t%s %s", plist->pl.param_type,
 			plist->pl.param_name);
diff --git a/src/rxkad/README.v5 b/src/rxkad/README.v5
index e8d26d0..c945fb3 100644
--- a/src/rxkad/README.v5
+++ b/src/rxkad/README.v5
@@ -1,30 +1,30 @@
 #
 #  This code depends on heimdal's asn1_compile generated krb5 decoding
-#  stuff. The code is orignally from rxkad that Björn Grönvall
+#  stuff. The code is originally from rxkad that Björn Grönvall
 #  <bg@sics.se> for kth-krb and was included in Arla.
-# 
+#
 #  The first file, v5der.c are part for of support functions
 #  that all generated files depends on.
-# 
-#  The second file (v5gen.h) is the headerfile that is generated for
+#
+#  The second file (v5gen.h) is the header file that is generated for
 #  the decoding functions.
-# 
-#  The third file (v5gen.c) is the subset of the genrated functions we
+#
+#  The third file (v5gen.c) is the subset of the generated functions we
 #  need to decode the authenticator.
-# 
+#
 #  The forth file (v5gen-rewrite.h) is used to make sure we don't
-#  polute the namespace.
-# 
-#  All files are modified to build within OpenAFS enviroment without
-#  any external dependencies. Below is the shellscript that is used to
+#  pollute the namespace.
+#
+#  All files are modified to build within OpenAFS environment without
+#  any external dependencies. Below is the shell script that is used to
 #  import the code into the four files.
-# 
+#
 #  All internal symbols are rewritten to _rxkad_v5_.
 #
 
 # Make sure we don't export too much
-# 
-# : lha@nutcracker ; nm ticket5.o | grep T | grep -v _rxkad_v5 
+#
+# : lha@nutcracker ; nm ticket5.o | grep T | grep -v _rxkad_v5
 # 00005748 T tkt_DecodeTicket5
 #
 
diff --git a/src/shlibafsrpc/Makefile.in b/src/shlibafsrpc/Makefile.in
index 3f7223c..eb6832e 100644
--- a/src/shlibafsrpc/Makefile.in
+++ b/src/shlibafsrpc/Makefile.in
@@ -404,7 +404,7 @@ syscall.o: ${SYS}/syscall.s
                 ${CC} ${CFLAGS} -c syscall.c;; \
 	 *) \
 		$(PATH_CPP) ${SFLAGS} ${SYS}/syscall.s > syscall.ss; \
-		as -o syscall.o syscall.ss;		\
+		as $(ASFLAGS) -o syscall.o syscall.ss;		\
 		$(RM) syscall.ss;;				\
 	esac
 
diff --git a/src/tbudb/.gitignore b/src/tbudb/.gitignore
index 1427515..d812870 100644
--- a/src/tbudb/.gitignore
+++ b/src/tbudb/.gitignore
@@ -3,7 +3,6 @@
 # to check that you haven't inadvertently ignored any tracked files.
 
 /budb.h
-/budb_client.h
 /budb_errs.c
 /budb_errs.h
 /budb_server
diff --git a/src/tbudb/Makefile.in b/src/tbudb/Makefile.in
index 0394941..087732c 100644
--- a/src/tbudb/Makefile.in
+++ b/src/tbudb/Makefile.in
@@ -38,7 +38,9 @@ INCLS=\
 	${TOP_INCDIR}/afs/cellconfig.h \
 	${TOP_INCDIR}/afs/com_err.h \
 	${TOP_INCDIR}/afs/bubasics.h \
-	budb.h budb_client.h
+	${TOP_INCDIR}/afs/budb_client.h \
+	${TOP_INCDIR}/afs/budb_errs.h \
+	budb.h $(BUDB)/budb_client.h
 
 # library ordering defined by top level makefile
 LIBS=${RXOBJS} ${UTILOBJS} \
@@ -56,16 +58,10 @@ SERVER_OBJS = ${COMMON_OBJS} budb.ss.o budb.xdr.o dbs_dump.o db_lock.o db_text.o
 
 all: ${TOP_LIBDIR}/libbudb.a ${TOP_INCDIR}/afs/budb.h ${TOP_INCDIR}/afs/budb_errs.h ${TOP_INCDIR}/afs/budb_client.h budb_server ${INCLS}
 
-#
-# budb_errs.o actually depends on neither budb_client.h nor budb_errs.h
-# but generating either of them will rebuild budb_errs.c
-#
-budb_errs.o: budb_errs.c budb_client.h budb_errs.h
-
-budb_errs.c budb_client.h: ${BUDB}/budb_errs.et ${BUDB}/budb_client.p.h
-	$(RM) -f budb_client.h budb_errs.c; ${COMPILE_ET} -p ${srcdir}/${BUDB} budb_errs -h budb_client
+budb_errs.h: budb_errs.c
 
-budb_errs.h: ${BUDB}/budb_errs.et
+budb_errs.c: ${BUDB}/budb_errs.et
+	$(RM) -f budb_errs.c
 	${COMPILE_ET} -p ${srcdir}/${BUDB} budb_errs
 
 #
@@ -147,7 +143,7 @@ ol_verify.o: ${BUDB}/ol_verify.c budb_errs.h ${INCLS}
 procs.o: ${BUDB}/procs.c budb_errs.h ${INCLS}
 	${CCRULE} ${srcdir}/${BUDB}/procs.c
 
-struct_ops.o: ${BUDB}/struct_ops.c budb_errs.h ${TOP_INCDIR}/afs/budb_client.h
+struct_ops.o: ${BUDB}/struct_ops.c budb_errs.h ${INCLS}
 	${CCRULE} ${srcdir}/${BUDB}/struct_ops.c
 
 server.o: ${BUDB}/server.c budb_errs.h ${INCLS}
@@ -191,7 +187,7 @@ ${DEST}/root.server/usr/afs/bin/buserver: budb_server
 # Misc targets
 #
 clean:
-	$(RM) -f *.o *~ budb_errs.[ch] budb.h budb_client.h *.a *.xdr.c \
+	$(RM) -f *.o *~ budb_errs.[ch] budb.h *.a *.xdr.c \
 		*.ss.c *.cs.c core budb_server AFS_component_version_number.c
 
 include ../config/Makefile.version
diff --git a/src/tests/README b/src/tests/README
index f73299e..db54cd1 100644
--- a/src/tests/README
+++ b/src/tests/README
@@ -3,12 +3,12 @@ AFS verification suite
 
 Prerequisites
 
-1) A Kerberos KDC should already be configured 
+1) A Kerberos KDC should already be configured
 2) An afs key should be in the KeyFile the AFS binaries will use
    (/usr/afs/etc/KeyFile in an IBM-style installation; bos_util can be used
     to set it up)
 3) 2 srvtabs or keytabs with user keys, one for the user "admin"
-   and one for the user "user" that can be used for authenticated testing 
+   and one for the user "user" that can be used for authenticated testing
    of the AFS installation
 4) The necessary tools for getting an AFS token from the installed Kerberos
    (typically aklog) should be available.
@@ -56,7 +56,7 @@ B) Basic functionality
 
 C) Mountpoint tests
 10) Create and remove a good mountpoint. (mkm-rmm)
-20) Create a mountpoint to a nonexistant volume. (mountpoint)
+20) Create a mountpoint to a nonexistent volume. (mountpoint)
 
 D) ACL tests
 10) Add a valid PTS user to an ACL. (acladduser)
@@ -209,22 +209,22 @@ Some tests as noted are:
  * Copyright (c) 2001 Kungliga Tekniska Högskolan
  * (Royal Institute of Technology, Stockholm, Sweden).
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
- * 
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 
+ *
  * 3. Neither the name of the Institute nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
diff --git a/src/tests/README.afstools b/src/tests/README.afstools
index d9f5c7f..e0a3aa4 100644
--- a/src/tests/README.afstools
+++ b/src/tests/README.afstools
@@ -1,2 +1,2 @@
-This is a (potentially) modified verion of the AFSTools perl suite. 
+This is a (potentially) modified version of the AFSTools perl suite.
 You should visit grand.central.org for the official version.
diff --git a/src/tests/README.dumptool b/src/tests/README.dumptool
index 69c28dd..ef55d42 100644
--- a/src/tests/README.dumptool
+++ b/src/tests/README.dumptool
@@ -54,21 +54,21 @@ accepts the following commands:
 	    -F  Append / to filenames for directories, @ for symlinks,
 		and * for files which have the execute bits set.
 	    -R  Recurse through all subdirectories.
-	
+
 	cd	Change the current directory
 
 	cp	Copy a file from the dump.  Note that globbing is NOT
 		supported, and you must give a filename (the Unix
 		idiom of just giving a destination directory for the
 		second argument to cp will NOT work).
-	
+
 	vcp	Copy a file from the dump, by the vnode.  The first
 		argument is the vnode number, optionally followed by
-		the uniqifier.  E.g:
+		the uniquifier.  E.g:
 
 		vcp 126278 /tmp/file1
 		vcp 126278.43289 /tmp/file2
-	
+
 	quit	Exits dumptool.
 	exit
 
@@ -79,14 +79,14 @@ Dumptool supports a number of command-line options.  They are detailed
 below:
 
 	-v	Verbose mode.  Output additional information during dump
-		processing.  Each -v will increate output.
+		processing.  Each -v will increase output.
 
 	-f	Force dump processing.  Attempt to continue processing
 		a dump even when some errors are detected.  Not completely
 		tested.
-	
+
 	-i	Inode dump.  Dump a list of all files in the volume,
-		with their volume/vnode/uniqifier information.
+		with their volume/vnode/uniquifier information.
 
 
 SUPPORT FOR MR-AFS
@@ -98,11 +98,11 @@ Additional command line options:
 
 	-d	Dump all residency filenames in the dump file to standard
 		output.
-	
+
 	-t 	Residency tag information.  Allows a user to specify the
 		tag of a residency if the rsserver is not available.
 		Format of option is Residency/Tag
-	
+
 	-r	Residency filesystem information.  Allows a user to specify
 		the residency filesystem information if dumptool is not
 		run on the same host as the residency in the dump.  Format
@@ -149,4 +149,4 @@ think it's only polite for you to do the same.
 CONTACT INFORMATION
 
 As always, please send comments, suggestions, or new features to me,
-Ken Hornstein <kenh@cmf.nrl.navy.mil>.  Shar and enjoy.
+Ken Hornstein <kenh@cmf.nrl.navy.mil>.  Share and enjoy.
diff --git a/src/tests/afscp.c b/src/tests/afscp.c
index 0cbeba4..fc5194b 100644
--- a/src/tests/afscp.c
+++ b/src/tests/afscp.c
@@ -525,7 +525,7 @@ main(int argc, char **argv)
     } else {
 	fetchcode = rx_EndCall(scall, fetchcode);
     }
-    if (fetchcode && printcallerrs)
+    if (fetchcode)
 	printf("Error returned from fetch: %s\n", afs_error_message(fetchcode));
 
     if (dlcl) {
@@ -534,7 +534,7 @@ main(int argc, char **argv)
     } else if (!unlock) {
 	storecode = rx_EndCall(dcall, storecode);
     }
-    if (storecode && printcallerrs)
+    if (storecode)
 	printf("Error returned from store: %s\n", afs_error_message(storecode));
 Finish:
     gettimeofday(&finish, &tz);
diff --git a/src/tests/pathname.c b/src/tests/pathname.c
index 0057df8..19e43ad 100644
--- a/src/tests/pathname.c
+++ b/src/tests/pathname.c
@@ -280,7 +280,7 @@ Path_Build(XFILE * X, path_hashinfo * phi, afs_uint32 vnode, char **his_path,
 
     if (vnode == 1) {
 	*his_path = (char *)malloc(2);
-	if (!his_path) {
+	if (!*his_path) {
 	    if (phi->p->cb_error)
 		(phi->p->cb_error) (ENOMEM, 1, phi->p->err_refcon,
 				    "No memory for pathname of vnode 1");
diff --git a/src/tools/audit/readsysvmq b/src/tools/audit/readsysvmq
new file mode 100755
index 0000000..1006799
--- /dev/null
+++ b/src/tools/audit/readsysvmq
@@ -0,0 +1,84 @@
+#!/usr/bin/perl
+#
+# Copyright (c) 2012, Sine Nomine Associates
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+=head1 NAME
+
+readsysvmq - example program to read the sysvmq audit log
+
+=head1 SYNOPSIS
+
+B<readsysvmq> I<path>
+
+=head1 DESCRIPTION
+
+This is an example script to read the OpenAFS fileserver System V message queue
+(sysvmq) based audit log. The OpenAFS fileserver writed to the sysv message
+queue audit log when it is started with the C<-audit-interface sysvmq> option
+in conjuntion with the C<-auditlog> option.
+
+=head1 OPTIONS
+
+=over 8
+
+=item I<path>
+
+The path of the sysvmq audit log. This should match the path given in the
+fileserver C<-auditlog> command line option.
+
+=back
+
+=head1 SEE ALSO
+
+fileserver
+
+=head1 COPYRIGHT
+
+Copyright (c) 2012, Sine Nomine Associates
+
+=cut
+
+
+use strict;
+use warnings;
+use IPC::SysV qw(S_IRUSR ftok);
+
+if (scalar @ARGV != 1) {
+    print("usage: $0 <auditlog-path>\n");
+    exit(1);
+}
+
+my $path = $ARGV[0];
+
+my $mqkey = ftok($path, 1);
+unless (defined $mqkey) {
+    die "$path does not exist\n";
+}
+
+my $mqid = msgget($mqkey, S_IRUSR);
+unless (defined $mqid) {
+    die "message queue $mqkey ($path) cannot be opened\n";
+}
+
+my $msgsize = 2048;
+my ($msg, $msgtype, $msgtext);
+while (1) {
+    if (msgrcv($mqid, $msg, $msgsize, 0, 0)) {
+        ($msgtype, $msgtext) = unpack("i! a*", $msg);
+        print $msgtext, "\n";
+    }
+}
+
diff --git a/src/ubik/beacon.c b/src/ubik/beacon.c
index 1d3ee6d..192b206 100644
--- a/src/ubik/beacon.c
+++ b/src/ubik/beacon.c
@@ -428,6 +428,28 @@ ubeacon_Interact(void *dummy)
 		ts = servers[multi_i];
 		ts->lastBeaconSent = temp;
 		code = multi_error;
+
+		if (code > 0 && ((code < temp && code < temp - 3600) ||
+		                 (code > temp && code > temp + 3600))) {
+		    /* if we reached here, supposedly the remote host voted
+		     * for us based on a computation from over an hour ago in
+		     * the past, or over an hour in the future. this is
+		     * unlikely; what actually probably happened is that the
+		     * call generated some error and was aborted. this can
+		     * happen due to errors with the rx security class in play
+		     * (rxkad, rxgk, etc). treat the host as if we got a
+		     * timeout, since this is not a valid vote. */
+		    ubik_print("assuming distant vote time %d from %s is an error; marking host down\n",
+		               (int)code, afs_inet_ntoa_r(ts->addr[0], hoststr));
+		    code = -1;
+		}
+		if (code > 0 && rx_ConnError(connections[multi_i])) {
+		    ubik_print("assuming vote from %s is invalid due to conn error %d; marking host down\n",
+		               afs_inet_ntoa_r(ts->addr[0], hoststr),
+		               (int)rx_ConnError(connections[multi_i]));
+		    code = -1;
+		}
+
 		/* note that the vote time (the return code) represents the time
 		 * the vote was computed, *not* the time the vote expires.  We compute
 		 * the latter down below if we got enough votes to go with */
@@ -556,7 +578,7 @@ verifyInterfaceAddress(afs_uint32 *ame, struct afsconf_cell *info,
     }
 
     if (count <= 0) {		/* no address found */
-	ubik_print("ubik: No network addresses found, aborting..");
+	ubik_print("ubik: No network addresses found, aborting..\n");
 	return UBADHOST;
     }
 
@@ -580,7 +602,7 @@ verifyInterfaceAddress(afs_uint32 *ame, struct afsconf_cell *info,
 	    *ame = myAddr[0];
 	    tcount = rx_getAllAddr(myAddr2, UBIK_MAX_INTERFACE_ADDR);
 	    if (tcount <= 0) {	/* no address found */
-		ubik_print("ubik: No network addresses found, aborting..");
+		ubik_print("ubik: No network addresses found, aborting..\n");
 		return UBADHOST;
 	    }
 
@@ -707,10 +729,9 @@ updateUbikNetworkAddress(afs_uint32 ubik_host[UBIK_MAX_INTERFACE_ADDR])
 		     afs_inet_ntoa_r(ts->addr[0], hoststr));
 	    } else if (multi_error == UBADHOST) {
 		code = UBADHOST;	/* remote CellServDB inconsistency */
-		ubik_print("Inconsistent Cell Info on server: ");
+		ubik_print("Inconsistent Cell Info on server:\n");
 		for (j = 0; j < UBIK_MAX_INTERFACE_ADDR && ts->addr[j]; j++)
-		    ubik_print("%s ", afs_inet_ntoa_r(ts->addr[j], hoststr));
-		ubik_print("\n");
+		    ubik_print("... %s\n", afs_inet_ntoa_r(ts->addr[j], hoststr));
 	    } else {
 		ts->up = 0;	/* mark the remote server as down */
 	    }
diff --git a/src/ubik/phys.c b/src/ubik/phys.c
index d0f65c7..5c8ee19 100644
--- a/src/ubik/phys.c
+++ b/src/ubik/phys.c
@@ -293,6 +293,9 @@ uphys_setlabel(struct ubik_dbase *adbase, afs_int32 afile,
     fd = uphys_open(adbase, afile);
     if (fd < 0)
 	return UNOENT;
+
+    memset(&thdr, 0, sizeof(thdr));
+
     thdr.version.epoch = htonl(aversion->epoch);
     thdr.version.counter = htonl(aversion->counter);
     thdr.magic = htonl(UBIK_MAGIC);
diff --git a/src/ubik/recovery.c b/src/ubik/recovery.c
index b17d054..4919882 100644
--- a/src/ubik/recovery.c
+++ b/src/ubik/recovery.c
@@ -878,7 +878,7 @@ DoProbe(struct ubik_server *server)
     extern afs_int32 ubikSecIndex;
     extern struct rx_securityClass *ubikSecClass;
 
-    for (i = 0; (addr = server->addr[i]) && (i < UBIK_MAX_INTERFACE_ADDR);
+    for (i = 0; (i < UBIK_MAX_INTERFACE_ADDR) && (addr = server->addr[i]);
 	 i++) {
 	conns[i] =
 	    rx_NewConnection(addr, ubik_callPortal, DISK_SERVICE_ID,
diff --git a/src/ubik/remote.c b/src/ubik/remote.c
index a669da2..83ede63 100644
--- a/src/ubik/remote.c
+++ b/src/ubik/remote.c
@@ -494,7 +494,11 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
 
     /* send the file back to the requester */
 
+    dbase = ubik_dbase;
+    pbuffer[0] = '\0';
+
     if ((code = ubik_CheckAuth(rxcall))) {
+	DBHOLD(dbase);
 	goto failed;
     }
 
@@ -515,10 +519,10 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
     if (offset && offset != otherHost) {
 	/* we *know* this is the wrong guy */
 	code = USYNC;
+	DBHOLD(dbase);
 	goto failed;
     }
 
-    dbase = ubik_dbase;
     DBHOLD(dbase);
 
     /* abort any active trans that may scribble over the database */
@@ -559,7 +563,6 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
 #endif
 	code = rx_Read(rxcall, tbuffer, tlen);
 	if (code != tlen) {
-	    DBRELE(dbase);
 	    ubik_dprint("Rx-read length error=%d\n", code);
 	    code = BULK_ERROR;
 	    close(fd);
@@ -572,7 +575,6 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
 	pass++;
 #endif
 	if (code != tlen) {
-	    DBRELE(dbase);
 	    ubik_dprint("write failed error=%d\n", code);
 	    code = UIOERROR;
 	    close(fd);
@@ -620,11 +622,12 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
 #else
     LWP_NoYieldSignal(&dbase->version);
 #endif
-    DBRELE(dbase);
-  failed:
+
+failed:
     if (code) {
 #ifndef OLD_URECOVERY
-	unlink(pbuffer);
+	if (pbuffer[0] != '\0')
+	    unlink(pbuffer);
 	/* Failed to sync. Allow reads again for now. */
 	if (dbase != NULL) {
 	    tversion.epoch = epoch;
@@ -637,6 +640,7 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
     } else {
 	ubik_print("Ubik: Synchronize database completed\n");
     }
+    DBRELE(dbase);
     return code;
 }
 
@@ -697,10 +701,9 @@ SDISK_UpdateInterfaceAddr(struct rx_call *rxcall,
     /* if (probableMatch) */
     /* inconsistent addresses in CellServDB */
     if (!probableMatch || found) {
-	ubik_print("Inconsistent Cell Info from server: ");
+	ubik_print("Inconsistent Cell Info from server:\n");
 	for (i = 0; i < UBIK_MAX_INTERFACE_ADDR && inAddr->hostAddr[i]; i++)
-	    ubik_print("%s ", afs_inet_ntoa_r(htonl(inAddr->hostAddr[i]), hoststr));
-	ubik_print("\n");
+	    ubik_print("... %s\n", afs_inet_ntoa_r(htonl(inAddr->hostAddr[i]), hoststr));
 	fflush(stdout);
 	fflush(stderr);
 	printServerInfo();
@@ -711,10 +714,9 @@ SDISK_UpdateInterfaceAddr(struct rx_call *rxcall,
     for (i = 1; i < UBIK_MAX_INTERFACE_ADDR; i++)
 	ts->addr[i] = htonl(inAddr->hostAddr[i]);
 
-    ubik_print("ubik: A Remote Server has addresses: ");
+    ubik_print("ubik: A Remote Server has addresses:\n");
     for (i = 0; i < UBIK_MAX_INTERFACE_ADDR && ts->addr[i]; i++)
-	ubik_print("%s ", afs_inet_ntoa_r(ts->addr[i], hoststr));
-    ubik_print("\n");
+	ubik_print("... %s\n", afs_inet_ntoa_r(ts->addr[i], hoststr));
 
     return 0;
 }
@@ -726,13 +728,12 @@ printServerInfo(void)
     int i, j = 1;
     char hoststr[16];
 
-    ubik_print("Local CellServDB:");
+    ubik_print("Local CellServDB:\n");
     for (ts = ubik_servers; ts; ts = ts->next, j++) {
-	ubik_print("Server %d: ", j);
+	ubik_print("  Server %d:\n", j);
 	for (i = 0; (i < UBIK_MAX_INTERFACE_ADDR) && ts->addr[i]; i++)
-	    ubik_print("%s ", afs_inet_ntoa_r(ts->addr[i], hoststr));
+	    ubik_print("  ... %s\n", afs_inet_ntoa_r(ts->addr[i], hoststr));
     }
-    ubik_print("\n");
 }
 
 afs_int32
diff --git a/src/ubik/ubik.c b/src/ubik/ubik.c
index cb04bf5..ce1c847 100644
--- a/src/ubik/ubik.c
+++ b/src/ubik/ubik.c
@@ -1409,7 +1409,7 @@ panic(char *format, ...)
     va_list ap;
 
     va_start(ap, format);
-    ubik_print("Ubik PANIC: ");
+    ubik_print("Ubik PANIC:\n");
     ubik_vprint(format, ap);
     va_end(ap);
 
diff --git a/src/ubik/udebug.c b/src/ubik/udebug.c
index 83a395f..d02bd71 100644
--- a/src/ubik/udebug.c
+++ b/src/ubik/udebug.c
@@ -163,7 +163,7 @@ CommandProc(struct cmd_syndesc *as, void *arock)
     times[24] = 0;
     if (!oldServer) {
 	printf("Host's addresses are: ");
-	for (j = 0; udebug.interfaceAddr[j] && (j < UBIK_MAX_INTERFACE_ADDR);
+	for (j = 0; (j < UBIK_MAX_INTERFACE_ADDR) && udebug.interfaceAddr[j];
 	     j++)
 	    printf("%s ", afs_inet_ntoa_r(htonl(udebug.interfaceAddr[j]), hoststr));
 	printf("\n");
@@ -179,7 +179,7 @@ CommandProc(struct cmd_syndesc *as, void *arock)
 
     /* UBIK skips the voting if 1 server - so we fudge it here */
     if (udebug.amSyncSite && (udebug.nServers == 1)) {
-	udebug.lastYesHost = hostAddr;
+	udebug.lastYesHost = ntohl(hostAddr);
 	udebug.lastYesTime = udebug.now;
 	udebug.lastYesState = 1;
 	udebug.lastYesClaim = udebug.now;
@@ -296,7 +296,7 @@ CommandProc(struct cmd_syndesc *as, void *arock)
 	    /* otherwise print the structure */
 	    printf("\nServer (%s", afs_inet_ntoa_r(htonl(usdebug.addr), hoststr));
 	    for (j = 0;
-		 ((usdebug.altAddr[j]) && (j < UBIK_MAX_INTERFACE_ADDR - 1));
+		 ((j < UBIK_MAX_INTERFACE_ADDR - 1) && (usdebug.altAddr[j]));
 		 j++)
 		printf(" %s", afs_inet_ntoa_r(htonl(usdebug.altAddr[j]), hoststr));
 	    printf("): (db %d.%d)", usdebug.remoteVersion.epoch,
diff --git a/src/util/afsutil_prototypes.h b/src/util/afsutil_prototypes.h
index 17fbde0..191a665 100644
--- a/src/util/afsutil_prototypes.h
+++ b/src/util/afsutil_prototypes.h
@@ -40,7 +40,7 @@ typedef struct afs_config_section_struct afs_config_section;
 extern int afs_config_parse_file_multi(const char *, afs_config_section **);
 extern int afs_config_parse_file(const char *, afs_config_section **);
 extern int afs_config_file_free(afs_config_section *s);
-extern const char* fs_config_get_string(const afs_config_section *, ...);
+extern const char* afs_config_get_string(const afs_config_section *, ...);
 extern int afs_config_get_bool(const afs_config_section *, ...);
 extern int afs_config_get_int(const afs_config_section *c, ...);
 
diff --git a/src/util/hostparse.c b/src/util/hostparse.c
index 2462931..ede75ab 100644
--- a/src/util/hostparse.c
+++ b/src/util/hostparse.c
@@ -131,10 +131,13 @@ hostutil_GetNameByINet(afs_uint32 addr)
 ** w.x.y.z 	# machineName
 ** returns the network interface in network byte order
 */
+
+#define MAXBYTELEN 32
 afs_uint32
 extractAddr(char *line, int maxSize)
 {
-    char byte1[32], byte2[32], byte3[32], byte4[32];
+    char byte1[MAXBYTELEN], byte2[MAXBYTELEN];
+    char byte3[MAXBYTELEN], byte4[MAXBYTELEN];
     int i = 0;
     char *endPtr;
     afs_uint32 val1, val2, val3, val4;
@@ -153,7 +156,7 @@ extractAddr(char *line, int maxSize)
     while ((*line != '.') && maxSize) {	/* extract first byte */
 	if (!isdigit(*line))
 	    return AFS_IPINVALID;
-	if (i > 31)
+	if (i >= MAXBYTELEN-1)
 	    return AFS_IPINVALID;	/* no space */
 	byte1[i++] = *line++;
 	maxSize--;
@@ -166,7 +169,7 @@ extractAddr(char *line, int maxSize)
     while ((*line != '.') && maxSize) {	/* extract second byte */
 	if (!isdigit(*line))
 	    return AFS_IPINVALID;
-	if (i > 31)
+	if (i >= MAXBYTELEN-1)
 	    return AFS_IPINVALID;	/* no space */
 	byte2[i++] = *line++;
 	maxSize--;
@@ -179,7 +182,7 @@ extractAddr(char *line, int maxSize)
     while ((*line != '.') && maxSize) {
 	if (!isdigit(*line))
 	    return AFS_IPINVALID;
-	if (i > 31)
+	if (i >= MAXBYTELEN-1)
 	    return AFS_IPINVALID;	/* no space */
 	byte3[i++] = *line++;
 	maxSize--;
@@ -192,7 +195,7 @@ extractAddr(char *line, int maxSize)
     while (*line && !isspace(*line) && maxSize) {
 	if (!isdigit(*line))
 	    return AFS_IPINVALID;
-	if (i > 31)
+	if (i >= MAXBYTELEN-1)
 	    return AFS_IPINVALID;	/* no space */
 	byte4[i++] = *line++;
 	maxSize--;
diff --git a/src/venus/Makefile.in b/src/venus/Makefile.in
index 8c073c5..56d67e0 100644
--- a/src/venus/Makefile.in
+++ b/src/venus/Makefile.in
@@ -12,7 +12,7 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 KRB5CFLAGS = @KRB5_CPPFLAGS@
-KRB5LIBS = @KRB5_LIBS@
+KRB5LIBS = @KRB5_LDFLAGS@ @KRB5_LIBS@
 
 INCLS=${TOP_INCDIR}/afs/afsint.h \
 	${TOP_INCDIR}/afs/cmd.h \
diff --git a/src/venus/cacheout.c b/src/venus/cacheout.c
index e49ddd6..2a390ad 100644
--- a/src/venus/cacheout.c
+++ b/src/venus/cacheout.c
@@ -22,6 +22,7 @@
 
 #include <ctype.h>
 #include <sys/types.h>
+#include <afs/auth.h>
 #include <afs/cmd.h>
 #include <afs/cellconfig.h>
 #include <afs/afsint.h>
@@ -46,7 +47,8 @@ static afs_int32 server_id[256];
 
 static struct ubik_client *client;
 
-static struct rx_securityClass *junk;
+static struct rx_securityClass *sc;
+static int scindex;
 
 /*
 Obtain list of file servers as known to VLDB. These may
@@ -180,7 +182,7 @@ InvalidateCache(struct cmd_syndesc *as, void *arock)
 	    err = 1;
 	    continue;
 	}
-	conn = rx_NewConnection(server_id[i], htons(port), 1, junk, 0);
+	conn = rx_NewConnection(server_id[i], htons(port), 1, sc, scindex);
 	if (!conn) {
 	    printf("Informational: could not connect to \
 file server %s\n", afs_inet_ntoa_r(server_id[i], hoststr));
@@ -248,8 +250,13 @@ MyBeforeProc(struct cmd_syndesc *as, void *arock)
     struct afsconf_cell info;
     struct rx_connection *serverconns[MAXSERVERS];
     afs_int32 code, i;
+    struct rx_securityClass *scnull;
 
     sprintf(confdir, "%s", AFSDIR_CLIENT_ETC_DIRPATH);
+    if (as->parms[4].items) { /* -localauth */
+	sprintf(confdir, "%s", AFSDIR_SERVER_ETC_DIRPATH);
+    }
+
     /* setup to talk to servers */
     code = rx_Init(0);
     if (code) {
@@ -257,7 +264,9 @@ MyBeforeProc(struct cmd_syndesc *as, void *arock)
 	return 1;
     }
 
-    junk = rxnull_NewClientSecurityObject();
+    scnull = sc = rxnull_NewClientSecurityObject();
+    scindex = 0;
+
     tdir = afsconf_Open(confdir);
     if (!tdir) {
 	printf("Warning: could not get cell configuration.\n");
@@ -272,10 +281,38 @@ MyBeforeProc(struct cmd_syndesc *as, void *arock)
 	return 1;
     }
 
+    if (as->parms[4].items) { /* -localauth */
+	code = afsconf_ClientAuth(tdir, &sc, &scindex);
+	if (code || scindex == 0) {
+	    afsconf_Close(tdir);
+	    fprintf(stderr, "Could not get security object for -localauth (code: %d)\n",
+	            code);
+	    return -1;
+	}
+
+    } else if (!as->parms[3].items) { /* not -noauth */
+	struct ktc_principal sname;
+	struct ktc_token ttoken;
+
+	strcpy(sname.cell, info.name);
+	sname.instance[0] = '\0';
+	strcpy(sname.name, "afs");
+
+	code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), NULL);
+	if (code) {
+	    fprintf(stderr, "Could not get afs tokens, running unauthenticated\n");
+	} else {
+	    scindex = 2;
+	    sc = rxkad_NewClientSecurityObject(rxkad_auth, &ttoken.sessionKey,
+	                                       ttoken.kvno, ttoken.ticketLen,
+	                                       ttoken.ticket);
+	}
+    }
+
     for (i = 0; i < info.numServers; ++i)
 	serverconns[i] =
 	    rx_NewConnection(info.hostAddr[i].sin_addr.s_addr,
-			     info.hostAddr[i].sin_port, USER_SERVICE_ID, junk,
+			     info.hostAddr[i].sin_port, USER_SERVICE_ID, scnull,
 			     0);
     for (; i < MAXSERVERS; ++i) {
 	serverconns[i] = (struct rx_connection *)0;
@@ -315,6 +352,8 @@ main(int argc, char **argv)
     cmd_AddParm(ts, "-ip", CMD_LIST, CMD_OPTIONAL, "IP address");
     cmd_CreateAlias(ts, "ic");
     cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
+    cmd_AddParm(ts, "-noauth", CMD_FLAG, CMD_OPTIONAL, "don't authenticate");
+    cmd_AddParm(ts, "-localauth", CMD_FLAG, CMD_OPTIONAL, "user server tickets");
 
     ts = cmd_CreateSyntax("listservers", GetServerList, NULL,
 			  "list servers in the cell");
diff --git a/src/venus/up.c b/src/venus/up.c
index e21cfff..2b79e9f 100644
--- a/src/venus/up.c
+++ b/src/venus/up.c
@@ -440,7 +440,7 @@ Copy(char *file1, char *file2, short recursive, int level)
 	    fflush(stdout);
 	}
 
-	n = readlink(file1, linkvalue, sizeof(linkvalue));
+	n = readlink(file1, linkvalue, sizeof(linkvalue)-1);
 	if (n == -1) {
 	    fprintf(stderr, "Could not read symbolic link %s\n", file1);
 	    perror("read link ");
diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c
index cf0dd0b..ac2ec89 100644
--- a/src/viced/afsfileprocs.c
+++ b/src/viced/afsfileprocs.c
@@ -1234,6 +1234,26 @@ RXStore_AccessList(Vnode * targetptr, struct AFSOpaque *AccessList)
 
 }				/*RXStore_AccessList */
 
+static int
+CheckLink(Volume *volptr, FdHandle_t *fdP, const char *descr)
+{
+    int code;
+    afs_ino_str_t ino;
+
+    code = FDH_ISUNLINKED(fdP);
+    if (code < 0) {
+	ViceLog(0, ("CopyOnWrite: error fstating volume %u inode %s (%s), errno %d\n",
+	            V_id(volptr), PrintInode(ino, fdP->fd_ih->ih_ino), descr, errno));
+	return -1;
+    }
+    if (code) {
+	ViceLog(0, ("CopyOnWrite corruption prevention: detected zero nlink for "
+	            "volume %u inode %s (%s), forcing volume offline\n",
+	            V_id(volptr), PrintInode(ino, fdP->fd_ih->ih_ino), descr));
+	return -1;
+    }
+    return 0;
+}
 
 /* In our current implementation, each successive data store (new file
  * data version) creates a new inode. This function creates the new
@@ -1313,6 +1333,20 @@ CopyOnWrite(Vnode * targetptr, Volume * volptr, afs_foff_t off, afs_fsize_t len)
     newFdP = IH_OPEN(newH);
     osi_Assert(newFdP != NULL);
 
+    rc = CheckLink(volptr, targFdP, "source");
+    if (!rc) {
+	rc = CheckLink(volptr, newFdP, "dest");
+    }
+    if (rc) {
+	FDH_REALLYCLOSE(newFdP);
+	IH_RELEASE(newH);
+	FDH_REALLYCLOSE(targFdP);
+	IH_DEC(V_linkHandle(volptr), ino, V_parentId(volptr));
+	free(buff);
+	VTakeOffline(volptr);
+	return VSALVAGE;
+    }
+
     done = off;
     while (size > 0) {
 	if (size > COPYBUFFSIZE) {	/* more than a buffer */
@@ -6503,7 +6537,7 @@ SRXAFS_GetCapabilities(struct rx_call * acall, Capabilities * capabilities)
     code = CallPostamble(tcon, code, thost);
 
 
-    return 0;
+    return code;
 }
 
 afs_int32
@@ -6798,10 +6832,6 @@ SRXAFS_GetVolumeStatus(struct rx_call * acall, afs_int32 avolid,
 			  &rights, &anyrights)))
 	goto Bad_GetVolumeStatus;
 
-    if ((VanillaUser(client)) && (!(rights & PRSFS_READ))) {
-	errorCode = EACCES;
-	goto Bad_GetVolumeStatus;
-    }
     (void)RXGetVolumeStatus(FetchVolStatus, Name, OfflineMsg, Motd, volptr);
 
   Bad_GetVolumeStatus:
@@ -7580,6 +7610,7 @@ StoreData_RXStyle(Volume * volptr, Vnode * targetptr, struct AFSFid * Fid,
 	/* Set the file's length; we've already done an lseek to the right
 	 * spot above.
 	 */
+	tlen = 0; /* Just a source of data for the write */
 	nBytes = FDH_PWRITE(fdP, &tlen, 1, Pos);
 	if (nBytes != 1) {
 	    errorCode = -1;
diff --git a/src/viced/callback.c b/src/viced/callback.c
index e32c906..5566c81 100644
--- a/src/viced/callback.c
+++ b/src/viced/callback.c
@@ -1508,6 +1508,19 @@ GetSomeSpace_r(struct host *hostp, int locked)
     struct lih_params params;
     int i = 0;
 
+    if (cbstuff.GotSomeSpaces == 0) {
+	/* only log this once; if GSS is getting called constantly, that's not
+	 * good but don't make things worse by spamming the log. */
+	ViceLog(0, ("We have run out of callback space; forcing callback revocation. "
+	            "This suggests the fileserver is configured with insufficient "
+	            "callbacks; you probably want to increase the -cb fileserver "
+	            "parameter (current setting: %u). The fileserver will continue "
+	            "to operate, but this may indicate a severe performance problem\n",
+	            cbstuff.nblks));
+	ViceLog(0, ("This message is logged at most once; for more information "
+	            "see the OpenAFS documentation and fileserver xstat collection 3\n"));
+    }
+
     cbstuff.GotSomeSpaces++;
     ViceLog(5,
 	    ("GSS: First looking for timed out call backs via CleanupCallBacks\n"));
diff --git a/src/viced/host.c b/src/viced/host.c
index 71cad29..9921912 100644
--- a/src/viced/host.c
+++ b/src/viced/host.c
@@ -2184,7 +2184,9 @@ h_GetHost_r(struct rx_connection *tcon)
 		    /* the new host is held and locked */
 		} else {
 		    /* This really is a new host */
-		    h_AddHostToUuidHashTable_r(&identP->uuid, host);
+		    osi_Assert(interfValid == 1);
+		    initInterfaceAddr_r(host, &interf);
+
 		    cb_conn = host->callback_rxcon;
 		    rx_GetConnection(cb_conn);
 		    H_UNLOCK;
@@ -2199,8 +2201,6 @@ h_GetHost_r(struct rx_connection *tcon)
 				("InitCallBackState3 success on host %" AFS_PTR_FMT " (%s:%d)\n",
 				 host, afs_inet_ntoa_r(host->host, hoststr),
 				 ntohs(host->port)));
-			osi_Assert(interfValid == 1);
-			initInterfaceAddr_r(host, &interf);
 		    }
 		}
 	    }
@@ -2462,8 +2462,10 @@ h_FindClient_r(struct rx_connection *tcon)
 		     tname, tinst, tcell, expTime, kvno));
 	    strncpy(uname, tname, sizeof(uname));
 	    if (ilen) {
-		if (strlen(uname) + 1 + ilen >= sizeof(uname))
+		if (strlen(uname) + 1 + ilen >= sizeof(uname)) {
+		    code = -1;
 		    goto bad_name;
+		}
 		strcat(uname, ".");
 		strcat(uname, tinst);
 	    }
@@ -4121,7 +4123,7 @@ initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf)
 
     /*
      * Convert IP addresses to network byte order, and remove
-     * duplicate IP addresses from the interface list, and
+     * duplicate and loopback IP addresses from the interface list, and
      * determine whether or not the incoming addr/port is
      * listed.  Note that if the address matches it is not
      * truly a match because the port number for the entries
@@ -4129,6 +4131,9 @@ initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf)
      * for this connection might not be 7001.
      */
     for (i = 0, count = 0, found = 0; i < number; i++) {
+	if (rx_IsLoopbackAddr(interf->addr_in[i])) {
+	    continue;
+	}
 	interf->addr_in[i] = htonl(interf->addr_in[i]);
 	for (j = 0; j < count; j++) {
 	    if (interf->addr_in[j] == interf->addr_in[i])
@@ -4185,6 +4190,8 @@ initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf)
     osi_Assert(!host->interface);
     host->interface = interface;
 
+    h_AddHostToUuidHashTable_r(&interface->uuid, host);
+
     if (LogLevel >= 125) {
 	afsUUID_to_string(&interface->uuid, uuidstr, 127);
 
diff --git a/src/viced/physio.c b/src/viced/physio.c
index b56465d..26499a3 100644
--- a/src/viced/physio.c
+++ b/src/viced/physio.c
@@ -58,10 +58,10 @@ ReallyRead(DirHandle * file, int block, char *data)
     if (fdP == NULL) {
 	code = errno;
 	ViceLog(0,
-		("ReallyRead(): open failed device %X inode %s errno %d\n",
+		("ReallyRead(): open failed device %X inode %s (volume=%u) errno %d\n",
 		 file->dirh_handle->ih_dev, PrintInode(stmp,
 						       file->dirh_handle->
-						       ih_ino), code));
+						       ih_ino), file->dirh_handle->ih_vid,code));
 	return code;
     }
     rdlen = FDH_PREAD(fdP, data, PAGESIZE, ((afs_foff_t)block) * PAGESIZE);
@@ -71,10 +71,10 @@ ReallyRead(DirHandle * file, int block, char *data)
 	else
 	    code = EIO;
 	ViceLog(0,
-		("ReallyRead(): read failed device %X inode %s errno %d\n",
+		("ReallyRead(): read failed device %X inode %s (volume=%u) errno %d\n",
 		 file->dirh_handle->ih_dev, PrintInode(stmp,
 						       file->dirh_handle->
-						       ih_ino), code));
+						       ih_ino), file->dirh_handle->ih_vid,code));
 	FDH_REALLYCLOSE(fdP);
 	return code;
     }
@@ -94,19 +94,19 @@ ReallyWrite(DirHandle * file, int block, char *data)
     fdP = IH_OPEN(file->dirh_handle);
     if (fdP == NULL) {
 	ViceLog(0,
-		("ReallyWrite(): open failed device %X inode %s errno %d\n",
+		("ReallyWrite(): open failed device %X inode %s (volume=%u) errno %d\n",
 		 file->dirh_handle->ih_dev, PrintInode(stmp,
 						       file->dirh_handle->
-						       ih_ino), errno));
+						       ih_ino), file->dirh_handle->ih_vid,errno));
 	lpErrno = errno;
 	return 0;
     }
     if ((count = FDH_PWRITE(fdP, data, PAGESIZE, ((afs_foff_t)block) * PAGESIZE)) != PAGESIZE) {
 	ViceLog(0,
-		("ReallyWrite(): write failed device %X inode %s errno %d\n",
+		("ReallyWrite(): write failed device %X inode %s (volume=%u) errno %d\n",
 		 file->dirh_handle->ih_dev, PrintInode(stmp,
 						       file->dirh_handle->
-						       ih_ino), errno));
+						       ih_ino), file->dirh_handle->ih_vid,errno));
 	lpCount = count;
 	lpErrno = errno;
 	FDH_REALLYCLOSE(fdP);
diff --git a/src/viced/viced.c b/src/viced/viced.c
index d717b2d..7173b10 100644
--- a/src/viced/viced.c
+++ b/src/viced/viced.c
@@ -964,6 +964,7 @@ FlagMsg(void)
     fputs("[-abortthreshold <abort threshold>] ", stdout);
     fputs("[-nojumbo (disable jumbogram network packets - deprecated)] ", stdout);
     fputs("[-jumbo (enable jumbogram network packets)] ", stdout);
+    fputs("[-sync <always | delayed | onclose | never>]", stdout);
 /*   fputs("[-enable_peer_stats] ", stdout); */
 /*   fputs("[-enable_process_stats] ", stdout); */
     fputs("[-help]\n", stdout);
@@ -1436,6 +1437,16 @@ ParseArgs(int argc, char *argv[])
 	else if (strcmp(argv[i], "-saneacls") == 0) {
 	    saneacls = 1;
 	}
+	else if (strcmp(argv[i], "-sync") == 0) {
+	    if ((i + 1) >= argc) {
+		printf("You have to specify -sync <sync behavior>\n");
+		return -1;
+	    }
+	    if (ih_SetSyncBehavior(argv[++i])) {
+		printf("Invalid -sync value %s\n", argv[i]);
+		return -1;
+	    }
+	}
 	else {
 	    return (-1);
 	}
@@ -1648,6 +1659,11 @@ vl_Initialize(const char *confDir)
 	exit(1);
     }
     code = afsconf_GetCellInfo(tdir, NULL, AFSCONF_VLDBSERVICE, &info);
+    if (code) {
+	ViceLog(0,
+		("vl_Initialize: Failed to get cell information\n"));
+	exit(1);
+    }
     if (info.numServers > MAXSERVERS) {
 	ViceLog(0,
 		("vl_Initialize: info.numServers=%d (> MAXSERVERS=%d)\n",
@@ -1905,7 +1921,7 @@ InitVL(void)
     code = vl_Initialize(AFSDIR_SERVER_ETC_DIRPATH);
     if (code != 0) {
 	ViceLog(0,
-		("Couldn't initialize protection library; code=%d.\n", code));
+		("Couldn't initialize volume location library; code=%d.\n", code));
 	return code;
     }
 
diff --git a/src/vlserver/vlprocs.c b/src/vlserver/vlprocs.c
index 3a53a25..1d4474e 100644
--- a/src/vlserver/vlprocs.c
+++ b/src/vlserver/vlprocs.c
@@ -3024,7 +3024,7 @@ vlentry_to_nvldbentry(struct nvlentry *VlEntry, struct nvldbentry *VldbEntry)
 {
     int i, j;
 
-    memset(VldbEntry, 0, sizeof(struct vldbentry));
+    memset(VldbEntry, 0, sizeof(struct nvldbentry));
     strncpy(VldbEntry->name, VlEntry->name, sizeof(VldbEntry->name));
     for (i = 0; i < NMAXNSERVERS; i++) {
 	if (VlEntry->serverNumber[i] == BADSERVERID)
@@ -3062,7 +3062,7 @@ vlentry_to_uvldbentry(struct nvlentry *VlEntry, struct uvldbentry *VldbEntry)
 {
     int i, j;
 
-    memset(VldbEntry, 0, sizeof(struct vldbentry));
+    memset(VldbEntry, 0, sizeof(struct uvldbentry));
     strncpy(VldbEntry->name, VlEntry->name, sizeof(VldbEntry->name));
     for (i = 0; i < NMAXNSERVERS; i++) {
 	if (VlEntry->serverNumber[i] == BADSERVERID)
diff --git a/src/vlserver/vlserver.c b/src/vlserver/vlserver.c
index 1eeae56..5deab49 100644
--- a/src/vlserver/vlserver.c
+++ b/src/vlserver/vlserver.c
@@ -342,6 +342,13 @@ main(int argc, char **argv)
 	}
     }
 
+    if (!rxJumbograms) {
+	rx_SetNoJumbo();
+    }
+    if (rxMaxMTU != -1) {
+	rx_SetMaxMTU(rxMaxMTU);
+    }
+
     ubik_nBuffers = 512;
     ubik_CRXSecurityProc = afsconf_ClientAuth;
     ubik_CRXSecurityRock = (char *)tdir;
@@ -356,12 +363,6 @@ main(int argc, char **argv)
 	printf("vlserver: Ubik init failed: %s\n", afs_error_message(code));
 	exit(2);
     }
-    if (!rxJumbograms) {
-	rx_SetNoJumbo();
-    }
-    if (rxMaxMTU != -1) {
-	rx_SetMaxMTU(rxMaxMTU);
-    }
     rx_SetRxDeadTime(50);
 
     memset(HostAddress, 0, sizeof(HostAddress));
diff --git a/src/vol/ihandle.c b/src/vol/ihandle.c
index e9cb7a8..f8db2cd 100644
--- a/src/vol/ihandle.c
+++ b/src/vol/ihandle.c
@@ -114,6 +114,34 @@ void ih_PkgDefaults(void)
     /* fd cache size that will be used if/when ih_UseLargeCache()
      * is called */
     vol_io_params.fd_max_cachesize = FD_MAX_CACHESIZE;
+
+    vol_io_params.sync_behavior = IH_SYNC_DELAYED;
+}
+
+int
+ih_SetSyncBehavior(const char *behavior)
+{
+    int val;
+
+    if (strcmp(behavior, "always") == 0) {
+	val = IH_SYNC_ALWAYS;
+
+    } else if (strcmp(behavior, "delayed") == 0) {
+	val = IH_SYNC_DELAYED;
+
+    } else if (strcmp(behavior, "onclose") == 0) {
+	val = IH_SYNC_ONCLOSE;
+
+    } else if (strcmp(behavior, "never") == 0) {
+	val = IH_SYNC_NEVER;
+
+    } else {
+	/* invalid behavior name */
+	return -1;
+    }
+
+    vol_io_params.sync_behavior = val;
+    return 0;
 }
 
 #ifdef AFS_PTHREAD_ENV
@@ -173,7 +201,7 @@ ih_Initialize(void)
 #endif
     fdCacheSize = MIN(fdMaxCacheSize, vol_io_params.fd_initial_cachesize);
 
-    {
+    if (vol_io_params.sync_behavior == IH_SYNC_DELAYED) {
 #ifdef AFS_PTHREAD_ENV
 	pthread_t syncer;
 	pthread_attr_t tattr;
@@ -886,6 +914,8 @@ ih_reallyclose(IHandle_t * ihP)
     ihP->ih_refcnt++;   /* must not disappear over unlock */
     if (ihP->ih_synced) {
 	FdHandle_t *fdP;
+	osi_Assert(vol_io_params.sync_behavior != IH_SYNC_ALWAYS);
+	osi_Assert(vol_io_params.sync_behavior != IH_SYNC_NEVER);
         ihP->ih_synced = 0;
 	IH_UNLOCK;
 
@@ -1089,3 +1119,38 @@ ih_pwrite(int fd, const void * buf, size_t count, afs_foff_t offset)
 	return OS_WRITE(fd, buf, count);
 }
 #endif /* !HAVE_PIO */
+
+#ifndef AFS_NT40_ENV
+int
+ih_isunlinked(int fd)
+{
+    struct afs_stat status;
+    if (afs_fstat(fd, &status) < 0) {
+	return -1;
+    }
+    if (status.st_nlink < 1) {
+	return 1;
+    }
+    return 0;
+}
+#endif /* !AFS_NT40_ENV */
+
+int
+ih_fdsync(FdHandle_t *fdP)
+{
+    switch (vol_io_params.sync_behavior) {
+    case IH_SYNC_ALWAYS:
+	return OS_SYNC(fdP->fd_fd);
+    case IH_SYNC_DELAYED:
+    case IH_SYNC_ONCLOSE:
+	if (fdP->fd_ih) {
+	    fdP->fd_ih->ih_synced = 1;
+	    return 0;
+	}
+	return 1;
+    case IH_SYNC_NEVER:
+	return 0;
+    default:
+	osi_Assert(0);
+    }
+}
diff --git a/src/vol/ihandle.h b/src/vol/ihandle.h
index 3e093c4..718d9ae 100644
--- a/src/vol/ihandle.h
+++ b/src/vol/ihandle.h
@@ -61,6 +61,7 @@
  * status information:
  * FDH_SIZE - returns the size of the file.
  * FDH_NLINK - returns the link count of the file.
+ * FDH_ISUNLINKED - returns if the file has been unlinked out from under us
  *
  * Miscellaneous:
  * FDH_FDOPEN - create a descriptor for buffered I/O
@@ -71,25 +72,25 @@
 #define _IHANDLE_H_
 
 #ifdef AFS_PTHREAD_ENV
-#include <pthread.h>
+# include <pthread.h>
 extern pthread_once_t ih_glock_once;
 extern pthread_mutex_t ih_glock_mutex;
 extern void ih_glock_init(void);
-#define IH_LOCK \
+# define IH_LOCK \
     do { osi_Assert(pthread_once(&ih_glock_once, ih_glock_init) == 0);	\
 	MUTEX_ENTER(&ih_glock_mutex); \
     } while (0)
-#define IH_UNLOCK MUTEX_EXIT(&ih_glock_mutex)
+# define IH_UNLOCK MUTEX_EXIT(&ih_glock_mutex)
 #else /* AFS_PTHREAD_ENV */
-#define IH_LOCK
-#define IH_UNLOCK
+# define IH_LOCK
+# define IH_UNLOCK
 #endif /* AFS_PTHREAD_ENV */
 
 #ifndef DLL_INIT_LIST
 /*
  * Macro to initialize a doubly linked list, lifted from Encina
  */
-#define DLL_INIT_LIST(head, tail)	\
+# define DLL_INIT_LIST(head, tail)	\
     do {			 	\
 	(head) = NULL;			\
 	(tail) = NULL;			\
@@ -98,7 +99,7 @@ extern void ih_glock_init(void);
 /*
  * Macro to remove an element from a doubly linked list
  */
-#define DLL_DELETE(ptr,head,tail,next,prev)	\
+# define DLL_DELETE(ptr,head,tail,next,prev)	\
     do {					\
 	if ((ptr)->next) 			\
 	    (ptr)->next->prev = (ptr)->prev;	\
@@ -115,7 +116,7 @@ extern void ih_glock_init(void);
 /*
  * Macro to insert an element at the tail of a doubly linked list
  */
-#define DLL_INSERT_TAIL(ptr,head,tail,next,prev) \
+# define DLL_INSERT_TAIL(ptr,head,tail,next,prev) \
     do {					 \
 	(ptr)->next = NULL;			 \
         (ptr)->prev = (tail);			 \
@@ -132,7 +133,7 @@ extern void ih_glock_init(void);
 #ifdef AFS_NT40_ENV
 typedef __int64 Inode;
 #else
-#include <afs/afssyscalls.h>
+# include <afs/afssyscalls.h>
 #endif
 
 /* The dir package's page hashing function is dependent upon the layout of
@@ -149,10 +150,10 @@ struct IHandle_s;
  */
 #ifdef AFS_NT40_ENV
 typedef HANDLE FD_t;
-#define INVALID_FD INVALID_HANDLE_VALUE
+# define INVALID_FD INVALID_HANDLE_VALUE
 #else
 typedef int FD_t;
-#define INVALID_FD ((FD_t)-1)
+# define INVALID_FD ((FD_t)-1)
 #endif
 
 /* file descriptor handle */
@@ -199,6 +200,26 @@ typedef struct StreamHandle_s {
 #define FD_HANDLE_MALLOCSIZE	((size_t)((4096/sizeof(FdHandle_t))))
 #define STREAM_HANDLE_MALLOCSIZE 1
 
+/* Possible values for the vol_io_params.sync_behavior option.
+ * These dictate what actually happens when you call FDH_SYNC or IH_CONDSYNC. */
+#define IH_SYNC_ALWAYS (1)  /* This makes FDH_SYNCs do what you'd probably
+                             * expect: a synchronous fsync() */
+#define IH_SYNC_ONCLOSE (2) /* This makes FDH_SYNCs just flag the ih as "I
+                             * need to sync", and does not perform the actual
+                             * fsync() until we IH_REALLYCLOSE. This provides a
+                             * little assurance over IH_SYNC_NEVER when a volume
+                             * has gone offline, and a few other situations. */
+#define IH_SYNC_NEVER   (3) /* This makes FDH_SYNCs do nothing. Faster, but
+                             * obviously less durable. The OS may ensure that
+                             * our data hits the disk eventually, depending on
+                             * the platform and various OS-specific tuning
+                             * parameters. */
+#define IH_SYNC_DELAYED (4) /* This makes FDH_SYNCs set a flag in the ih that
+                             * says "I need to sync". And in a separate thread,
+                             * ih_sync_thread finds all IHs that have this
+                             * flag set, and it syncs them. Such IHs are also
+                             * synced when closed, as in IH_SYNC_ONCLOSE. */
+
 
 /* READ THIS.
  *
@@ -217,8 +238,9 @@ typedef struct ih_init_params
     afs_uint32 fd_handle_setaside; /* for non-cached i/o, trad. was 128 */
     afs_uint32 fd_initial_cachesize; /* what was 'default' */
     afs_uint32 fd_max_cachesize; /* max open files if large-cache activated */
-} ih_init_params;
 
+    int sync_behavior; /* one of the IH_SYNC_* constants */
+} ih_init_params;
 
 /* Number of file descriptors needed for non-cached I/O */
 #define FD_HANDLE_SETASIDE	128 /* Match to MAX_FILESERVER_THREAD */
@@ -283,10 +305,10 @@ typedef struct IHashBucket_s {
 
 /* Prototypes for handle support routines. */
 #ifdef AFS_NAMEI_ENV
-#ifdef AFS_NT40_ENV
-#include "ntops.h"
-#endif
-#include "namei_ops.h"
+# ifdef AFS_NT40_ENV
+#  include "ntops.h"
+# endif
+# include "namei_ops.h"
 
 extern void ih_clear(IHandle_t * h);
 extern Inode ih_create(IHandle_t * h, int dev, char *part, Inode nI, int p1,
@@ -300,6 +322,7 @@ extern FILE *ih_fdopen(FdHandle_t * h, char *fdperms);
 extern void ih_PkgDefaults(void);
 extern void ih_Initialize(void);
 extern void ih_UseLargeCache(void);
+extern int ih_SetSyncBehavior(const char *behavior);
 extern IHandle_t *ih_init(int /*@alt Device@ */ dev, int /*@alt VolId@ */ vid,
 			  Inode ino);
 extern IHandle_t *ih_copy(IHandle_t * ihP);
@@ -362,59 +385,62 @@ extern int ih_condsync(IHandle_t * ihP);
 #define IH_CONDSYNC(H) ih_condsync(H)
 
 #ifdef HAVE_PIO
-#ifdef AFS_NT40_ENV
-#define OS_PREAD(FD, B, S, O) nt_pread(FD, B, S, O)
-#define OS_PWRITE(FD, B, S, O) nt_pwrite(FD, B, S, O)
-#else
-#ifdef O_LARGEFILE
-#define OS_PREAD(FD, B, S, O) pread64(FD, B, S, O)
-#define OS_PWRITE(FD, B, S, O) pwrite64(FD, B, S, O)
-#else /* !O_LARGEFILE */
-#define OS_PREAD(FD, B, S, O) pread(FD, B, S, O)
-#define OS_PWRITE(FD, B, S, O) pwrite(FD, B, S, O)
-#endif /* !O_LARGEFILE */
-#endif /* AFS_NT40_ENV */
+# ifdef AFS_NT40_ENV
+#  define OS_PREAD(FD, B, S, O) nt_pread(FD, B, S, O)
+#  define OS_PWRITE(FD, B, S, O) nt_pwrite(FD, B, S, O)
+# else
+#  ifdef O_LARGEFILE
+#   define OS_PREAD(FD, B, S, O) pread64(FD, B, S, O)
+#   define OS_PWRITE(FD, B, S, O) pwrite64(FD, B, S, O)
+#  else /* !O_LARGEFILE */
+#   define OS_PREAD(FD, B, S, O) pread(FD, B, S, O)
+#   define OS_PWRITE(FD, B, S, O) pwrite(FD, B, S, O)
+#  endif /* !O_LARGEFILE */
+# endif /* AFS_NT40_ENV */
 #else /* !HAVE_PIO */
 extern ssize_t ih_pread(int fd, void * buf, size_t count, afs_foff_t offset);
 extern ssize_t ih_pwrite(int fd, const void * buf, size_t count, afs_foff_t offset);
-#define OS_PREAD(FD, B, S, O) ih_pread(FD, B, S, O)
-#define OS_PWRITE(FD, B, S, O) ih_pwrite(FD, B, S, O)
+# define OS_PREAD(FD, B, S, O) ih_pread(FD, B, S, O)
+# define OS_PWRITE(FD, B, S, O) ih_pwrite(FD, B, S, O)
 #endif /* !HAVE_PIO */
+
 #ifdef AFS_NT40_ENV
-#define OS_LOCKFILE(FD, O) (!LockFile(FD, (DWORD)((O) & 0xFFFFFFFF), (DWORD)((O) >> 32), 2, 0))
-#define OS_UNLOCKFILE(FD, O) (!UnlockFile(FD, (DWORD)((O) & 0xFFFFFFFF), (DWORD)((O) >> 32), 2, 0))
-#define OS_ERROR(X) nterr_nt2unix(GetLastError(), X)
-#define OS_UNLINK(X) nt_unlink(X)
-#define OS_DIRSEP "\\"
-#define OS_DIRSEPC '\\'
+# define OS_LOCKFILE(FD, O) (!LockFile(FD, (DWORD)((O) & 0xFFFFFFFF), (DWORD)((O) >> 32), 2, 0))
+# define OS_UNLOCKFILE(FD, O) (!UnlockFile(FD, (DWORD)((O) & 0xFFFFFFFF), (DWORD)((O) >> 32), 2, 0))
+# define OS_ERROR(X) nterr_nt2unix(GetLastError(), X)
+# define OS_UNLINK(X) nt_unlink(X)
+/* we can't have a file unlinked out from under us on NT */
+# define OS_ISUNLINKED(X) (0)
+# define OS_DIRSEP "\\"
+# define OS_DIRSEPC '\\'
 #else
-#define OS_LOCKFILE(FD, O) flock(FD, LOCK_EX)
-#define OS_UNLOCKFILE(FD, O) flock(FD, LOCK_UN)
-#define OS_ERROR(X) X
-#define OS_UNLINK(X) unlink(X)
-#define OS_DIRSEP "/"
-#define OS_DIRSEPC '/'
+# define OS_LOCKFILE(FD, O) flock(FD, LOCK_EX)
+# define OS_UNLOCKFILE(FD, O) flock(FD, LOCK_UN)
+# define OS_ERROR(X) X
+# define OS_UNLINK(X) unlink(X)
+# define OS_ISUNLINKED(X) ih_isunlinked(X)
+extern int ih_isunlinked(FD_t fd);
+# define OS_DIRSEP "/"
+# define OS_DIRSEPC '/'
 #endif
 
-
-
 #ifdef AFS_NAMEI_ENV
 
-#ifdef AFS_NT40_ENV
-#define OS_OPEN(F, M, P) nt_open(F, M, P)
-#define OS_CLOSE(FD) nt_close(FD)
+# ifdef AFS_NT40_ENV
+#  define OS_OPEN(F, M, P) nt_open(F, M, P)
+#  define OS_CLOSE(FD) nt_close(FD)
 
-#define OS_READ(FD, B, S) nt_read(FD, B, S)
-#define OS_WRITE(FD, B, S) nt_write(FD, B, S)
-#define OS_SEEK(FD, O, F) nt_seek(FD, O, F)
+#  define OS_READ(FD, B, S) nt_read(FD, B, S)
+#  define OS_WRITE(FD, B, S) nt_write(FD, B, S)
+#  define OS_SEEK(FD, O, F) nt_seek(FD, O, F)
 
-#define OS_SYNC(FD) nt_fsync(FD)
-#define OS_TRUNC(FD, L) nt_ftruncate(FD, L)
+#  define OS_SYNC(FD) nt_fsync(FD)
+#  define OS_TRUNC(FD, L) nt_ftruncate(FD, L)
 
-#else /* AFS_NT40_ENV */
+# else /* AFS_NT40_ENV */
 
 /*@+fcnmacros +macrofcndecl@*/
-#ifdef S_SPLINT_S
+#  ifdef S_SPLINT_S
 extern Inode IH_CREATE(IHandle_t * H, int /*@alt Device @ */ D,
 		       char *P, Inode N, int /*@alt VolumeId @ */ P1,
 		       int /*@alt VnodeId @ */ P2,
@@ -435,109 +461,109 @@ extern afs_sfsize_t IH_IREAD(IHandle_t * H, afs_foff_t O, void *B,
 			     afs_fsize_t S);
 extern afs_sfsize_t IH_IWRITE(IHandle_t * H, afs_foff_t O, void *B,
 			      afs_fsize_t S);
-#ifdef O_LARGEFILE
-#define OFFT off64_t
-#else
-#define OFFT off_t
-#endif
+#   ifdef O_LARGEFILE
+#    define OFFT off64_t
+#   else
+#    define OFFT off_t
+#   endif
 
 extern OFFT OS_SEEK(int FD, OFFT O, int F);
 extern int OS_TRUNC(int FD, OFFT L);
-#endif /*S_SPLINT_S */
-
-#ifdef O_LARGEFILE
-#define OS_OPEN(F, M, P) open64(F, M, P)
-#else /* !O_LARGEFILE */
-#define OS_OPEN(F, M, P) open(F, M, P)
-#endif /* !O_LARGEFILE */
-#define OS_CLOSE(FD) close(FD)
-
-#define OS_READ(FD, B, S) read(FD, B, S)
-#define OS_WRITE(FD, B, S) write(FD, B, S)
-#ifdef O_LARGEFILE
-#define OS_SEEK(FD, O, F) lseek64(FD, (off64_t) (O), F)
-#define OS_TRUNC(FD, L) ftruncate64(FD, (off64_t) (L))
-#else /* !O_LARGEFILE */
-#define OS_SEEK(FD, O, F) lseek(FD, (off_t) (O), F)
-#define OS_TRUNC(FD, L) ftruncate(FD, (off_t) (L))
-#endif /* !O_LARGEFILE */
-
-#define OS_SYNC(FD) fsync(FD)
+#  endif /*S_SPLINT_S */
+
+#  ifdef O_LARGEFILE
+#   define OS_OPEN(F, M, P) open64(F, M, P)
+#  else /* !O_LARGEFILE */
+#   define OS_OPEN(F, M, P) open(F, M, P)
+#  endif /* !O_LARGEFILE */
+#  define OS_CLOSE(FD) close(FD)
+
+#  define OS_READ(FD, B, S) read(FD, B, S)
+#  define OS_WRITE(FD, B, S) write(FD, B, S)
+#  ifdef O_LARGEFILE
+#   define OS_SEEK(FD, O, F) lseek64(FD, (off64_t) (O), F)
+#   define OS_TRUNC(FD, L) ftruncate64(FD, (off64_t) (L))
+#  else /* !O_LARGEFILE */
+#   define OS_SEEK(FD, O, F) lseek(FD, (off_t) (O), F)
+#   define OS_TRUNC(FD, L) ftruncate(FD, (off_t) (L))
+#  endif /* !O_LARGEFILE */
+
+#  define OS_SYNC(FD) fsync(FD)
 
 /*@=fcnmacros =macrofcndecl@*/
-#endif /* AFS_NT40_ENV */
-#define IH_INC(H, I, P) namei_inc(H, I, P)
-#define IH_DEC(H, I, P) namei_dec(H, I, P)
-#define IH_IREAD(H, O, B, S) namei_iread(H, O, B, S)
-#define IH_IWRITE(H, O, B, S) namei_iwrite(H, O, B, S)
-#define IH_CREATE(H, D, P, N, P1, P2, P3, P4) \
-	namei_icreate(H, P, P1, P2, P3, P4)
-#define OS_IOPEN(H) namei_iopen(H)
+# endif /* AFS_NT40_ENV */
+# define IH_INC(H, I, P) namei_inc(H, I, P)
+# define IH_DEC(H, I, P) namei_dec(H, I, P)
+# define IH_IREAD(H, O, B, S) namei_iread(H, O, B, S)
+# define IH_IWRITE(H, O, B, S) namei_iwrite(H, O, B, S)
+# define IH_CREATE(H, D, P, N, P1, P2, P3, P4) \
+         namei_icreate(H, P, P1, P2, P3, P4)
+# define OS_IOPEN(H) namei_iopen(H)
 
 
 #else /* AFS_NAMEI_ENV */
 extern Inode ih_icreate(IHandle_t * ih, int dev, char *part, Inode nI, int p1,
 			int p2, int p3, int p4);
 
-#define IH_CREATE(H, D, P, N, P1, P2, P3, P4) \
-	ih_icreate(H, D, P, N, P1, P2, P3, P4)
-
-#ifdef AFS_LINUX22_ENV
-#define OS_IOPEN(H) -1
-#else
-#ifdef O_LARGEFILE
-#define OS_IOPEN(H) (IOPEN((H)->ih_dev, (H)->ih_ino, O_RDWR|O_LARGEFILE))
-#else
-#define OS_IOPEN(H) (IOPEN((H)->ih_dev, (H)->ih_ino, O_RDWR))
-#endif
-#endif
-#define OS_OPEN(F, M, P) open(F, M, P)
-#define OS_CLOSE(FD) close(FD)
-
-#define OS_READ(FD, B, S) read(FD, B, S)
-#define OS_WRITE(FD, B, S) write(FD, B, S)
-#ifdef O_LARGEFILE
-#define OS_SEEK(FD, O, F) lseek64(FD, (off64_t) (O), F)
-#define OS_TRUNC(FD, L) ftruncate64(FD, (off64_t) (L))
-#else /* !O_LARGEFILE */
-#define OS_SEEK(FD, O, F) lseek(FD, (off_t) (O), F)
-#define OS_TRUNC(FD, L) ftruncate(FD, (off_t) (L))
-#endif /* !O_LARGEFILE */
-
-#define OS_SYNC(FD) fsync(FD)
-
-#ifdef AFS_LINUX22_ENV
-#define IH_INC(H, I, P) -1
-#define IH_DEC(H, I, P) -1
-#define IH_IREAD(H, O, B, S) -1
-#define IH_IWRITE(H, O, B, S) -1
-#else
-#define IH_INC(H, I, P) IINC((H)->ih_dev, I, P)
-#define IH_DEC(H, I, P) IDEC((H)->ih_dev, I, P)
-#define IH_IREAD(H, O, B, S) inode_read((H)->ih_dev, (H)->ih_ino, (H)->ih_vid,\
-					O, B, S)
-#define IH_IWRITE(H, O, B, S) \
-	inode_write((H)->ih_dev, (H)->ih_ino, (H)->ih_vid, O, B, S)
-#endif /* AFS_LINUX22_ENV */
-
+# define IH_CREATE(H, D, P, N, P1, P2, P3, P4) \
+        ih_icreate(H, D, P, N, P1, P2, P3, P4)
+
+# ifdef AFS_LINUX22_ENV
+#  define OS_IOPEN(H) -1
+# else
+#  ifdef O_LARGEFILE
+#   define OS_IOPEN(H) (IOPEN((H)->ih_dev, (H)->ih_ino, O_RDWR|O_LARGEFILE))
+#  else
+#   define OS_IOPEN(H) (IOPEN((H)->ih_dev, (H)->ih_ino, O_RDWR))
+#  endif
+# endif
+# define OS_OPEN(F, M, P) open(F, M, P)
+# define OS_CLOSE(FD) close(FD)
+
+# define OS_READ(FD, B, S) read(FD, B, S)
+# define OS_WRITE(FD, B, S) write(FD, B, S)
+# ifdef O_LARGEFILE
+#  define OS_SEEK(FD, O, F) lseek64(FD, (off64_t) (O), F)
+#  define OS_TRUNC(FD, L) ftruncate64(FD, (off64_t) (L))
+# else /* !O_LARGEFILE */
+#  define OS_SEEK(FD, O, F) lseek(FD, (off_t) (O), F)
+#  define OS_TRUNC(FD, L) ftruncate(FD, (off_t) (L))
+# endif /* !O_LARGEFILE */
+
+# define OS_SYNC(FD) fsync(FD)
+
+# ifdef AFS_LINUX22_ENV
+#  define IH_INC(H, I, P) -1
+#  define IH_DEC(H, I, P) -1
+#  define IH_IREAD(H, O, B, S) -1
+#  define IH_IWRITE(H, O, B, S) -1
+# else
+#  define IH_INC(H, I, P) IINC((H)->ih_dev, I, P)
+#  define IH_DEC(H, I, P) IDEC((H)->ih_dev, I, P)
+#  define IH_IREAD(H, O, B, S) inode_read((H)->ih_dev, (H)->ih_ino, (H)->ih_vid,\
+                                          O, B, S)
+#  define IH_IWRITE(H, O, B, S) \
+          inode_write((H)->ih_dev, (H)->ih_ino, (H)->ih_vid, O, B, S)
+# endif /* AFS_LINUX22_ENV */
 
 #endif /* AFS_NAMEI_ENV */
+
 #define OS_SIZE(FD) ih_size(FD)
 extern afs_sfsize_t ih_size(FD_t);
 
 #ifndef AFS_NT40_ENV
-#define FDH_READV(H, I, N) readv((H)->fd_fd, I, N)
-#define FDH_WRITEV(H, I, N) writev((H)->fd_fd, I, N)
+# define FDH_READV(H, I, N) readv((H)->fd_fd, I, N)
+# define FDH_WRITEV(H, I, N) writev((H)->fd_fd, I, N)
 #endif
 
 #ifdef HAVE_PIOV
-#ifdef O_LARGEFILE
-#define FDH_PREADV(H, I, N, O) preadv64((H)->fd_fd, I, N, O)
-#define FDH_PWRITEV(H, I, N, O) pwritev64((H)->fd_fd, I, N, O)
-#else /* !O_LARGEFILE */
-#define FDH_PREADV(H, I, N, O) preadv((H)->fd_fd, I, N, O)
-#define FDH_PWRITEV(H, I, N, O) pwritev((H)->fd_fd, I, N, O)
-#endif /* !O_LARGEFILE */
+# ifdef O_LARGEFILE
+#  define FDH_PREADV(H, I, N, O) preadv64((H)->fd_fd, I, N, O)
+#  define FDH_PWRITEV(H, I, N, O) pwritev64((H)->fd_fd, I, N, O)
+# else /* !O_LARGEFILE */
+#  define FDH_PREADV(H, I, N, O) preadv((H)->fd_fd, I, N, O)
+#  define FDH_PWRITEV(H, I, N, O) pwritev((H)->fd_fd, I, N, O)
+# endif /* !O_LARGEFILE */
 #endif
 
 #define FDH_PREAD(H, B, S, O) OS_PREAD((H)->fd_fd, B, S, O)
@@ -546,10 +572,13 @@ extern afs_sfsize_t ih_size(FD_t);
 #define FDH_WRITE(H, B, S) OS_WRITE((H)->fd_fd, B, S)
 #define FDH_SEEK(H, O, F) OS_SEEK((H)->fd_fd, O, F)
 
-#define FDH_SYNC(H) ((H->fd_ih!=NULL) ? ( H->fd_ih->ih_synced = 1) - 1 : 1)
+#define FDH_SYNC(H) ih_fdsync(H)
 #define FDH_TRUNC(H, L) OS_TRUNC((H)->fd_fd, L)
 #define FDH_SIZE(H) OS_SIZE((H)->fd_fd)
 #define FDH_LOCKFILE(H, O) OS_LOCKFILE((H)->fd_fd, O)
 #define FDH_UNLOCKFILE(H, O) OS_UNLOCKFILE((H)->fd_fd, O)
+#define FDH_ISUNLINKED(H) OS_ISUNLINKED((H)->fd_fd)
+
+extern int ih_fdsync(FdHandle_t *fdP);
 
 #endif /* _IHANDLE_H_ */
diff --git a/src/vol/listinodes.c b/src/vol/listinodes.c
index fd608aa..fcbdb2a 100644
--- a/src/vol/listinodes.c
+++ b/src/vol/listinodes.c
@@ -486,7 +486,6 @@ xfs_VerifyInode(char *dir, uint64_t pino, char *name, i_list_inode_t * info,
     int update_chown = 0;
     int retCode = 0;
     char tmpName[32];
-    b64_string_t stmp;
     int tag;
     afs_ino_str_t stmp;
 
diff --git a/src/vol/namei_ops.c b/src/vol/namei_ops.c
index 254e9a0..9095c96 100644
--- a/src/vol/namei_ops.c
+++ b/src/vol/namei_ops.c
@@ -806,11 +806,11 @@ namei_icreate(IHandle_t * lh, char *part, afs_uint32 p1, afs_uint32 p2, afs_uint
     p++;
     for (tag = 0; tag < NAMEI_MAXVOLS; tag++) {
         *p = *int_to_base32(str1, tag);
-        fd = afs_open((char *)&name.n_path, O_CREAT | O_RDWR | O_TRUNC | O_EXCL, 0666);
+        fd = afs_open((char *)&name.n_path, O_CREAT | O_RDWR | O_EXCL, 0666);
         if (fd == INVALID_FD) {
             if (errno == ENOTDIR || errno == ENOENT) {
                 if (namei_CreateDataDirectories(&name, &created_dir) == 0)
-                    fd = afs_open((char *)&name.n_path, O_CREAT | O_RDWR | O_TRUNC | O_EXCL, 0666);
+                    fd = afs_open((char *)&name.n_path, O_CREAT | O_RDWR | O_EXCL, 0666);
             }
         }
 
@@ -942,12 +942,12 @@ namei_icreate(IHandle_t * lh, char *part, afs_uint32 p1, afs_uint32 p2, afs_uint
     }
 
     namei_HandleToName(&name, &tmp);
-    fd = afs_open(name.n_path, O_CREAT | O_EXCL | O_TRUNC | O_RDWR, 0);
+    fd = afs_open(name.n_path, O_CREAT | O_EXCL | O_RDWR, 0);
     if (fd < 0) {
 	if (errno == ENOTDIR || errno == ENOENT) {
 	    if (namei_CreateDataDirectories(&name, &created_dir) < 0)
 		goto bad;
-	    fd = afs_open(name.n_path, O_CREAT | O_EXCL | O_TRUNC | O_RDWR,
+	    fd = afs_open(name.n_path, O_CREAT | O_EXCL | O_RDWR,
 			  0);
 	    if (fd < 0)
 		goto bad;
@@ -1198,7 +1198,7 @@ namei_copy_on_write(IHandle_t *h)
 	if (!fdP)
 	    return EIO;
 	afs_snprintf(path, sizeof(path), "%s-tmp", name.n_path);
-	fd = afs_open(path, O_CREAT | O_EXCL | O_TRUNC | O_RDWR, 0);
+	fd = afs_open(path, O_CREAT | O_EXCL | O_RDWR, 0);
 	if (fd < 0) {
 	    FDH_CLOSE(fdP);
 	    return EIO;
@@ -2977,7 +2977,7 @@ namei_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
     }
     t_ih.ih_ino = namei_MakeSpecIno(ih->ih_vid, VI_VOLINFO);
     namei_HandleToName(&n, &t_ih);
-    fd2 = afs_open(n.n_path, O_CREAT | O_EXCL | O_TRUNC | O_RDWR, 0);
+    fd2 = afs_open(n.n_path, O_CREAT | O_EXCL | O_RDWR, 0);
     if (fd2 == INVALID_FD) {
 	Log("1 namei_ConvertROtoRWvolume: could not create RW info file: %s\n", n.n_path);
 	OS_CLOSE(fd);
diff --git a/src/vol/salvager.c b/src/vol/salvager.c
index 16eeac2..3902c2d 100644
--- a/src/vol/salvager.c
+++ b/src/vol/salvager.c
@@ -244,7 +244,7 @@ handleit(struct cmd_syndesc *as, void *arock)
     }
     if ((ti = as->parms[12].items))	/* -showlog */
 	ShowLog = 1;
-    if ((ti = as->parms[13].items)) {	/* -log */
+    if ((ti = as->parms[13].items)) {	/* -showsuid */
 	Testing = 1;
 	ShowSuid = 1;
 	Showmode = 1;
diff --git a/src/vol/test/README b/src/vol/test/README
index 20f937f..dea2bb8 100644
--- a/src/vol/test/README
+++ b/src/vol/test/README
@@ -5,10 +5,10 @@ This software has been released under the terms of the IBM Public
 License.  For details, see the LICENSE file in the top-level source
 directory or online at http://www.openafs.org/dl/license10.html
 
-/* Tool for listing /vicepX partition 
+/* Tool for listing /vicepX partition
 **
 */
-listVicepx -p < partitionName> -v <volumeName> 
+listVicepx -p < partitionName> -v <volumeName>
 	      [-ls | -lsl | -ld | -dir <directoryInode> ]
 
 Without any input options, it prints out the names of symlinks and
@@ -18,15 +18,15 @@ With the -ls option, it prints out the names of all file/symlinks
 inside the volume.
 
 With the -lsl option, it prints out metadata about all file/symlink.
-This metadata includes the inode number(Ind), UNIX mode bits(Mod), 
+This metadata includes the inode number(Ind), UNIX mode bits(Mod),
 link count(Lnk), the owner(Own), the group(Grp) and the file size(Siz).
 
-With the -ld option, it prints out metadata about all directoies
+With the -ld option, it prints out metadata about all directories
 in this volume. This metadata includes the directory inode(Ind) and
-the directory vnode(Vnd) along woth the directory name. The root 
+the directory vnode(Vnd) along with the directory name. The root
 directory of the volume is indicated as ~.
 
-With the -dir <directory inode> option, this tool prints out the 
+With the -dir <directory inode> option, this tool prints out the
 contents of this directory. The inode number has to be a directory inode.
 
 COMPILATION:
@@ -36,5 +36,5 @@ ln -s ../SRC/test SRC
 ln -s ../DEST DEST
 make install
 
-The executable name is listVicepx. 
+The executable name is listVicepx.
 
diff --git a/src/vol/vol-info.c b/src/vol/vol-info.c
index a1ab3d3..e009d0b 100644
--- a/src/vol/vol-info.c
+++ b/src/vol/vol-info.c
@@ -626,7 +626,7 @@ main(int argc, char **argv)
     cmd_AddParm(ts, "-date", CMD_FLAG, CMD_OPTIONAL,
 		"Also dump vnode's mod date");
     cmd_AddParm(ts, "-inode", CMD_FLAG, CMD_OPTIONAL,
-		"Dump vnode's inode number");
+		"Also dump vnode's inode number");
     cmd_AddParm(ts, "-itime", CMD_FLAG, CMD_OPTIONAL,
 		"Dump special inode's mod times");
     cmd_AddParm(ts, "-part", CMD_LIST, CMD_OPTIONAL,
@@ -643,7 +643,7 @@ main(int argc, char **argv)
     cmd_AddParm(ts, "-orphaned", CMD_FLAG, CMD_OPTIONAL,
 		"List all dir/files without a parent");
 #if defined(AFS_NAMEI_ENV)
-    cmd_AddParm(ts, "-filenames", CMD_FLAG, CMD_OPTIONAL, "Print filenames");
+    cmd_AddParm(ts, "-filenames", CMD_FLAG, CMD_OPTIONAL, "Also dump vnode's namei filename");
 #endif
     code = cmd_Dispatch(argc, argv);
     return code;
diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c
index 21b4198..55afa95 100644
--- a/src/vol/vol-salvage.c
+++ b/src/vol/vol-salvage.c
@@ -2985,17 +2985,8 @@ CopyAndSalvage(struct SalvInfo *salvinfo, struct DirSummary *dir)
 		  vnodeIndexOffset(vcp, dir->vnodeNumber), (char *)&vnode,
 		  sizeof(vnode));
     osi_Assert(lcode == sizeof(vnode));
-#if 0
-#ifdef AFS_NT40_ENV
-    nt_sync(salvinfo->fileSysDevice);
-#else
-    sync();			/* this is slow, but hopefully rarely called.  We don't have
-				 * an open FD on the file itself to fsync.
-				 */
-#endif
-#else
-    salvinfo->vnodeInfo[vLarge].handle->ih_synced = 1;
-#endif
+    IH_CONDSYNC(salvinfo->vnodeInfo[vLarge].handle);
+
     /* make sure old directory file is really closed */
     fdP = IH_OPEN(dir->dirHandle.dirh_handle);
     FDH_REALLYCLOSE(fdP);
@@ -3322,7 +3313,7 @@ DistilVnodeEssence(struct SalvInfo *salvinfo, VolumeId rwVId,
 		if (class != vLarge) {
 		    VnodeId vnodeNumber = bitNumberToVnodeNumber(vnodeIndex, class);
 		    vip->nAllocatedVnodes--;
-		    memset(vnode, 0, sizeof(vnode));
+		    memset(vnode, 0, sizeof(*vnode));
 		    IH_IWRITE(salvinfo->vnodeInfo[vSmall].handle,
 			      vnodeIndexOffset(vcp, vnodeNumber),
 			      (char *)&vnode, sizeof(vnode));
@@ -4618,17 +4609,6 @@ PrintInodeSummary(struct SalvInfo *salvinfo)
     }
 }
 
-void
-PrintVolumeSummary(struct SalvInfo *salvinfo)
-{
-    int i;
-    struct VolumeSummary *vsp;
-
-    for (i = 0, vsp = salvinfo->volumeSummaryp; i < salvinfo->nVolumes; vsp++, i++) {
-	Log("fileName:%s, header, wouldNeedCallback\n", vsp->fileName);
-    }
-}
-
 int
 Fork(void)
 {
@@ -4662,12 +4642,12 @@ Exit(int code)
 
 #ifdef AFS_DEMAND_ATTACH_FS
     if (programType == salvageServer) {
-#ifdef SALVSYNC_BUILD_CLIENT
+# ifdef SALVSYNC_BUILD_CLIENT
 	VDisconnectSALV();
-#endif
-#ifdef FSSYNC_BUILD_CLIENT
+# endif
+# ifdef FSSYNC_BUILD_CLIENT
 	VDisconnectFS();
-#endif
+# endif
     }
 #endif /* AFS_DEMAND_ATTACH_FS */
 
diff --git a/src/vol/vol-salvage.h b/src/vol/vol-salvage.h
index 1c6c2d5..1f7c443 100644
--- a/src/vol/vol-salvage.h
+++ b/src/vol/vol-salvage.h
@@ -223,7 +223,6 @@ extern void ObtainSalvageLock(void);
 extern void ObtainSharedSalvageLock(void);
 extern void PrintInodeList(struct SalvInfo *salvinfo);
 extern void PrintInodeSummary(struct SalvInfo *salvinfo);
-extern void PrintVolumeSummary(struct SalvInfo *salvinfo);
 extern int QuickCheck(struct SalvInfo *salvinfo, struct InodeSummary *isp,
                       int nVols);
 extern void RemoveTheForce(char *path);
diff --git a/src/volser/dumpstuff.c b/src/volser/dumpstuff.c
index 53aa8b8..138949c 100644
--- a/src/volser/dumpstuff.c
+++ b/src/volser/dumpstuff.c
@@ -291,7 +291,8 @@ ReadStandardTagLen(struct iod *iodp, unsigned char tag, afs_int32 section,
     afs_int32 code, i;
     afs_uint32 off = tag >> 5;
     afs_uint32 mask = 1 << (tag & 0x1f);
-    unsigned char len, buf[8], *p;
+    int len;
+    unsigned char buf[8], *p;
 
     if (!oldtagsInited)
         initNonStandardTags();
@@ -305,7 +306,9 @@ ReadStandardTagLen(struct iod *iodp, unsigned char tag, afs_int32 section,
     }
     if (tag <= MAX_TLV_TAG) {
         len = iod_getc(iodp);
-        if (len < 128)
+	if (len == EOF)
+	    return VOLSERDUMPERROR;
+	else if (len < 128)
             *length = len;
         else {
             len &= 0x7f;
@@ -1084,6 +1087,7 @@ DumpVnode(struct iod *iodp, struct VnodeDiskObject *v, int volid,
 			       VAclDiskSize(v));
     }
     if (VNDISK_GET_INO(v)) {
+	afs_sfsize_t indexlen, disklen;
 	IH_INIT(ihP, iodp->device, iodp->parentId, VNDISK_GET_INO(v));
 	fdP = IH_OPEN(ihP);
 	if (fdP == NULL) {
@@ -1091,6 +1095,17 @@ DumpVnode(struct iod *iodp, struct VnodeDiskObject *v, int volid,
 	    IH_RELEASE(ihP);
 	    return VOLSERREAD_DUMPERROR;
 	}
+	VNDISK_GET_LEN(indexlen, v);
+	disklen = FDH_SIZE(fdP);
+	if (indexlen != disklen) {
+	    FDH_REALLYCLOSE(fdP);
+	    IH_RELEASE(ihP);
+	    Log("DumpVnode: volume %lu vnode %lu has inconsistent length "
+	        "(index %lu disk %lu); aborting dump\n",
+	        (unsigned long)volid, (unsigned long)vnodeNumber,
+	        (unsigned long)indexlen, (unsigned long)disklen);
+	    return VOLSERREAD_DUMPERROR;
+	}
 	code = DumpFile(iodp, vnodeNumber, fdP);
 	FDH_CLOSE(fdP);
 	IH_RELEASE(ihP);
diff --git a/src/volser/vol_split.c b/src/volser/vol_split.c
index d486e24..0306d5f 100644
--- a/src/volser/vol_split.c
+++ b/src/volser/vol_split.c
@@ -257,9 +257,9 @@ copyDir(struct Msg *m, IHandle_t *inh, IHandle_t *outh)
     infdP = IH_OPEN(inh);
     if (!infdP) {
 	sprintf(m->line, "Couldn't open input directory %u.%u.%u\n",
-		    infdP->fd_ih->ih_vid,
-		    (afs_uint32)(infdP->fd_ih->ih_ino & NAMEI_VNODEMASK),
-		    (afs_uint32)(infdP->fd_ih->ih_ino >> NAMEI_UNIQSHIFT));
+		    inh->ih_vid,
+		    (afs_uint32)(inh->ih_ino & NAMEI_VNODEMASK),
+		    (afs_uint32)(inh->ih_ino >> NAMEI_UNIQSHIFT));
 	rx_Write(m->call, m->line, strlen(m->line));
 	return EIO;
     }
@@ -275,9 +275,9 @@ copyDir(struct Msg *m, IHandle_t *inh, IHandle_t *outh)
     outfdP = IH_OPEN(outh);
     if (!outfdP) {
 	sprintf(m->line, "Couldn't open output directory %u.%u.%u\n",
-		    outfdP->fd_ih->ih_vid,
-		    (afs_uint32)(outfdP->fd_ih->ih_ino & NAMEI_VNODEMASK),
-		    (afs_uint32)(outfdP->fd_ih->ih_ino >> NAMEI_UNIQSHIFT));
+		    outh->ih_vid,
+		    (afs_uint32)(outh->ih_ino & NAMEI_VNODEMASK),
+		    (afs_uint32)(outh->ih_ino >> NAMEI_UNIQSHIFT));
 	rx_Write(m->call, m->line, strlen(m->line));
 	FDH_REALLYCLOSE(infdP);
 	return EIO;
diff --git a/src/volser/volmain.c b/src/volser/volmain.c
index 52e9b04..ea0af1b 100644
--- a/src/volser/volmain.c
+++ b/src/volser/volmain.c
@@ -374,6 +374,16 @@ main(int argc, char **argv)
 	    rx_enablePeerRPCStats();
 	} else if (strcmp(argv[code], "-enable_process_stats") == 0) {
 	    rx_enableProcessRPCStats();
+	} else if (strcmp(argv[code], "-sync") == 0) {
+	    if ((code + 1) >= argc) {
+		printf("You have to specify -sync <sync_behavior>\n");
+		exit(1);
+	    }
+	    ih_PkgDefaults();
+	    if (ih_SetSyncBehavior(argv[++code])) {
+		printf("Invalid -sync value %s\n", argv[code]);
+		exit(1);
+	    }
 	}
 #ifndef AFS_NT40_ENV
 	else if (strcmp(argv[code], "-syslog") == 0) {
@@ -394,6 +404,7 @@ main(int argc, char **argv)
 		   "[-udpsize <size of socket buffer in bytes>] "
 		   "[-syslog[=FACILITY]] "
 		   "[-enable_peer_stats] [-enable_process_stats] "
+		   "[-sync <always | delayed | onclose | never>] "
 		   "[-help]\n");
 #else
 	    printf("Usage: volserver [-log] [-p <number of processes>] "
@@ -401,6 +412,7 @@ main(int argc, char **argv)
 		   "[-nojumbo] [-jumbo] [-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
 		   "[-udpsize <size of socket buffer in bytes>] "
 		   "[-enable_peer_stats] [-enable_process_stats] "
+		   "[-sync <always | delayed | onclose | never>] "
 		   "[-help]\n");
 #endif
 	    VS_EXIT(1);
diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c
index d8b965c..16865b5 100644
--- a/src/volser/volprocs.c
+++ b/src/volser/volprocs.c
@@ -1901,7 +1901,7 @@ XVolListPartitions(struct rx_call *acid, struct partEntries *pEntries)
 	pEntries->partEntries_val = (afs_int32 *) malloc(j * sizeof(int));
 	if (!pEntries->partEntries_val)
 	    return ENOMEM;
-	memcpy((char *)pEntries->partEntries_val, (char *)&partList,
+	memcpy(pEntries->partEntries_val, partList.partId,
 		j * sizeof(int));
 	pEntries->partEntries_len = j;
     } else {
diff --git a/src/volser/vos.c b/src/volser/vos.c
index b08e97e..79f4cd7 100644
--- a/src/volser/vos.c
+++ b/src/volser/vos.c
@@ -3477,7 +3477,7 @@ ChangeLocation(struct cmd_syndesc *as, void *arock)
     }
     code = UV_ChangeLocation(aserver, apart, avolid);
     if (code) {
-	PrintDiagnostics("addsite", code);
+	PrintDiagnostics("changeloc", code);
 	exit(1);
     }
     MapPartIdIntoName(apart, apartName);
diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c
index a6dcb65..8044ed7 100644
--- a/src/volser/vsprocs.c
+++ b/src/volser/vsprocs.c
@@ -780,6 +780,12 @@ UV_CreateVolume3(afs_uint32 aserver, afs_int32 apart, char *aname,
     /* rw,ro, bk id are related in the default case */
     /* If caller specified RW id, but not RO/BK ids, have them be RW+1 and RW+2 */
     lastid = *anewid;
+    if (aroid && *aroid != 0) {
+	lastid = MAX(lastid, *aroid);
+    }
+    if (abkid && *abkid != 0) {
+	lastid = MAX(lastid, *abkid);
+    }
     if (aroid && *aroid == 0) {
 	*aroid = ++lastid;
     }
@@ -1185,6 +1191,12 @@ DoVolDelete(struct rx_connection *aconn, afs_uint32 avolid,
     code =
 	AFSVolTransCreate_retry(aconn, avolid, apart, ITOffline, &ttid);
 
+    /* return early and quietly for VNOVOL; don't continue the attempt to delete. */
+    if (code == VNOVOL) {
+	error = code;
+	goto dfail;
+    }
+
     EGOTO2(dfail, code, "%sFailed to start transaction on %u\n",
 	   prefix, avolid);
 
@@ -1874,6 +1886,9 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
 	code = DoVolDelete(fromconn, newVol, afrompart,
 			   "cloned", 0, NULL, NULL);
 	if (code) {
+	    if (code == VNOVOL) {
+		EPRINT1(code, "Failed to start transaction on %u\n", newVol);
+	    }
 	    error = code;
 	    goto mfail;
 	}
@@ -2036,9 +2051,13 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
 	    fflush(STDOUT);
 	}
 
-	if (volid && toconn)
+	if (volid && toconn) {
 	    code = DoVolDelete(toconn, volid, atopart,
 			       "destination", 0, NULL, "Recovery:");
+	    if (code == VNOVOL) {
+		EPRINT1(code, "Recovery: Failed to start transaction on %u\n", volid);
+	    }
+        }
 
 	/* put source volume on-line */
 	if (fromconn) {
@@ -2079,10 +2098,16 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
 	if (fromconn) {
 	    code = DoVolDelete(fromconn, backupId, afrompart,
 			       "backup", 0, NULL, "Recovery:");
+	    if (code == VNOVOL) {
+		EPRINT1(code, "Recovery: Failed to start transaction on %u\n", backupId);
+	    }
 
 	    code = DoVolDelete(fromconn, afromvol, afrompart, "source",
 			       (atoserver != afromserver)?atoserver:0,
 			       NULL, NULL);
+	    if (code == VNOVOL) {
+		EPRINT1(code, "Failed to start transaction on %u\n", afromvol);
+	    }
 	}
     }
 
@@ -2090,6 +2115,9 @@ UV_MoveVolume2(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
     if (newVol) {
 	code = DoVolDelete(fromconn, newVol, afrompart,
 			   "clone", 0, NULL, "Recovery:");
+	if (code == VNOVOL) {
+	    EPRINT1(code, "Recovery: Failed to start transaction on %u\n", newVol);
+	}
     }
 
     /* unlock VLDB entry */
@@ -2468,6 +2496,9 @@ cpincr:
 	code = DoVolDelete(fromconn, cloneVol, afrompart,
 			   "cloned", 0, NULL, NULL);
 	if (code) {
+	    if (code == VNOVOL) {
+		EPRINT1(code, "Failed to start transaction on %u\n", cloneVol);
+	    }
 	    error = code;
 	    goto mfail;
 	}
@@ -2593,9 +2624,13 @@ cpincr:
     MapHostToNetwork(&entry);
 
     /* common cleanup - delete local clone */
-    if (cloneVol)
+    if (cloneVol) {
 	code = DoVolDelete(fromconn, cloneVol, afrompart,
 			   "clone", 0, NULL, "Recovery:");
+	if (code == VNOVOL) {
+	    EPRINT1(code, "Recovery: Failed to start transaction on %u\n", cloneVol);
+	}
+    }
 
   done:			/* routine cleanup */
     if (fromconn)
@@ -7169,6 +7204,9 @@ UV_VolumeZap(afs_uint32 server, afs_int32 part, afs_uint32 volid)
     aconn = UV_Bind(server, AFSCONF_VOLUMEPORT);
     error = DoVolDelete(aconn, volid, part,
 			"the", 0, NULL, NULL);
+    if (error == VNOVOL) {
+	EPRINT1(error, "Failed to start transaction on %u\n", volid);
+    }
 
     PrintError("", error);
     if (aconn)
diff --git a/src/xstat/xstat_cm_test.c b/src/xstat/xstat_cm_test.c
index 9404d98..0573ea7 100644
--- a/src/xstat/xstat_cm_test.c
+++ b/src/xstat/xstat_cm_test.c
@@ -191,6 +191,8 @@ print_cmCallStats(void)
     printf("\t%10u afs_gn_lookup\n", cmp->callInfo.C_afs_gn_lookup);
     printf("\t%10u afs_gn_open\n", cmp->callInfo.C_afs_gn_open);
     printf("\t%10u afs_gn_create\n", cmp->callInfo.C_afs_gn_create);
+    printf("\t%10u afs_gn_close\n", cmp->callInfo.C_afs_gn_close);
+    printf("\t%10u afs_gn_map\n", cmp->callInfo.C_afs_gn_map);
     printf("\t%10u afs_gn_hold\n", cmp->callInfo.C_afs_gn_hold);
     printf("\t%10u afs_gn_rele\n", cmp->callInfo.C_afs_gn_rele);
     printf("\t%10u afs_gn_unmap\n", cmp->callInfo.C_afs_gn_unmap);
@@ -209,6 +211,9 @@ print_cmCallStats(void)
     printf("\t%10u DFlushEntry\n", cmp->callInfo.C_DFlushEntry);
     printf("\t%10u DVOffset\n", cmp->callInfo.C_DVOffset);
     printf("\t%10u DZap\n", cmp->callInfo.C_DZap);
+    printf("\t%10u shutdown_bufferpackage\n",
+	   cmp->callInfo.C_shutdown_bufferpackage);
+    printf("\t%10u afs_CheckKnownBad\n", cmp->callInfo.C_afs_CheckKnownBad);
     printf("\t%10u DNew\n", cmp->callInfo.C_DNew);
     printf("\t%10u afs_RemoveVCB\n", cmp->callInfo.C_afs_RemoveVCB);
     printf("\t%10u afs_NewVCache\n", cmp->callInfo.C_afs_NewVCache);
@@ -243,6 +248,7 @@ print_cmCallStats(void)
     printf("\t%10u afs_MemGetDSlot\n", cmp->callInfo.C_afs_MemGetDSlot);
     printf("\t%10u afs_UFSGetDSlot\n", cmp->callInfo.C_afs_UFSGetDSlot);
     printf("\t%10u afs_StoreDCache\n", cmp->callInfo.C_afs_StoreDCache);
+    printf("\t%10u shutdown_cache\n", cmp->callInfo.C_shutdown_cache);
     printf("\t%10u afs_StoreMini\n", cmp->callInfo.C_afs_StoreMini);
     printf("\t%10u afs_StoreAllSegments\n",
 	   cmp->callInfo.C_afs_StoreAllSegments);
@@ -262,17 +268,22 @@ print_cmCallStats(void)
     printf("\t%10u afs_GetDownV\n", cmp->callInfo.C_afs_GetDownV);
     printf("\t%10u afs_QueueVCB\n", cmp->callInfo.C_afs_QueueVCB);
     printf("\t%10u afs_call\n", cmp->callInfo.C_afs_call);
+    printf("\t%10u syscall\n", cmp->callInfo.C_syscall);
     printf("\t%10u afs_syscall_call\n", cmp->callInfo.C_afs_syscall_call);
     printf("\t%10u afs_syscall_icreate\n",
 	   cmp->callInfo.C_afs_syscall_icreate);
     printf("\t%10u afs_syscall_iopen\n", cmp->callInfo.C_afs_syscall_iopen);
     printf("\t%10u afs_syscall_iincdec\n",
 	   cmp->callInfo.C_afs_syscall_iincdec);
+    printf("\t%10u iincdec\n", cmp->callInfo.C_iincdec);
     printf("\t%10u afs_syscall_ireadwrite\n",
 	   cmp->callInfo.C_afs_syscall_ireadwrite);
     printf("\t%10u afs_syscall\n", cmp->callInfo.C_afs_syscall);
     printf("\t%10u lpioctl\n", cmp->callInfo.C_lpioctl);
     printf("\t%10u lsetpag\n", cmp->callInfo.C_lsetpag);
+    printf("\t%10u afs_shutdown\n", cmp->callInfo.C_afs_shutdown);
+    printf("\t%10u shutdown_BKG\n", cmp->callInfo.C_shutdown_BKG);
+    printf("\t%10u shutdown_afstest\n", cmp->callInfo.C_shutdown_afstest);
     printf("\t%10u afs_CheckInit\n", cmp->callInfo.C_afs_CheckInit);
     printf("\t%10u ClearCallback\n", cmp->callInfo.C_ClearCallBack);
     printf("\t%10u SRXAFSCB_GetCE\n", cmp->callInfo.C_SRXAFSCB_GetCE);
@@ -280,6 +291,9 @@ print_cmCallStats(void)
     printf("\t%10u SRXAFSCB_CallBack\n", cmp->callInfo.C_SRXAFSCB_CallBack);
     printf("\t%10u SRXAFSCB_InitCallBackState\n",
 	   cmp->callInfo.C_SRXAFSCB_InitCallBackState);
+    printf("\t%10u afs_RXCallBackServer\n",
+	   cmp->callInfo.C_afs_RXCallBackServer);
+    printf("\t%10u shutdown_CB\n", cmp->callInfo.C_shutdown_CB);
     printf("\t%10u SRXAFSCB_Probe\n", cmp->callInfo.C_SRXAFSCB_Probe);
     printf("\t%10u afs_Chunk\n", cmp->callInfo.C_afs_Chunk);
     printf("\t%10u afs_ChunkBase\n", cmp->callInfo.C_afs_ChunkBase);
@@ -290,6 +304,18 @@ print_cmCallStats(void)
     printf("\t%10u afs_SetChunkSize\n", cmp->callInfo.C_afs_SetChunkSize);
     printf("\t%10u afs_config\n", cmp->callInfo.C_afs_config);
     printf("\t%10u mem_freebytes\n", cmp->callInfo.C_mem_freebytes);
+    printf("\t%10u fpalloc\n", cmp->callInfo.C_fpalloc);
+    printf("\t%10u kluge_init\n", cmp->callInfo.C_kluge_init);
+    printf("\t%10u ufdalloc\n", cmp->callInfo.C_ufdalloc);
+    printf("\t%10u ufdfree\n", cmp->callInfo.C_ufdfree);
+    printf("\t%10u commit\n", cmp->callInfo.C_commit);
+    printf("\t%10u dev_ialloc\n", cmp->callInfo.C_dev_ialloc);
+    printf("\t%10u ffree\n", cmp->callInfo.C_ffree);
+    printf("\t%10u iget\n", cmp->callInfo.C_iget);
+    printf("\t%10u iptovp\n", cmp->callInfo.C_iptovp);
+    printf("\t%10u ilock\n", cmp->callInfo.C_ilock);
+    printf("\t%10u irele\n", cmp->callInfo.C_irele);
+    printf("\t%10u iput\n", cmp->callInfo.C_iput);
     printf("\t%10u mem_getbytes\n", cmp->callInfo.C_mem_getbytes);
     printf("\t%10u afs_Daemon\n", cmp->callInfo.C_afs_Daemon);
     printf("\t%10u afs_CheckRootVolume\n",
@@ -300,12 +326,17 @@ print_cmCallStats(void)
     printf("\t%10u afs_BBusy\n", cmp->callInfo.C_afs_BBusy);
     printf("\t%10u afs_BQueue\n", cmp->callInfo.C_afs_BQueue);
     printf("\t%10u afs_BRelease\n", cmp->callInfo.C_afs_BRelease);
+    printf("\t%10u shutdown_daemons\n", cmp->callInfo.C_shutdown_daemons);
     printf("\t%10u afs_BackgroundDaemon\n",
 	   cmp->callInfo.C_afs_BackgroundDaemon);
     printf("\t%10u exporter_add\n", cmp->callInfo.C_exporter_add);
     printf("\t%10u exporter_find\n", cmp->callInfo.C_exporter_find);
+    printf("\t%10u IsAfsVnode\n", cmp->callInfo.C_IsAfsVnode);
+    printf("\t%10u SetAfsVnode\n", cmp->callInfo.C_SetAfsVnode);
     printf("\t%10u afs_gfs_kalloc\n", cmp->callInfo.C_afs_gfs_kalloc);
     printf("\t%10u afs_gfs_kfree\n", cmp->callInfo.C_afs_gfs_kfree);
+    printf("\t%10u gfsvop_getattr\n", cmp->callInfo.C_gfsvop_getattr);
+    printf("\t%10u gfsvop_rdwr\n", cmp->callInfo.C_gfsvop_rdwr);
     printf("\t%10u gop_lookupname\n", cmp->callInfo.C_gop_lookupname);
     printf("\t%10u afs_uniqtime\n", cmp->callInfo.C_afs_uniqtime);
     printf("\t%10u gfs_vattr_null\n", cmp->callInfo.C_gfs_vattr_null);
@@ -319,10 +350,17 @@ print_cmCallStats(void)
     printf("\t%10u afs_gbmap\n", cmp->callInfo.C_afs_gbmap);
     printf("\t%10u afs_getfsdata\n", cmp->callInfo.C_afs_getfsdata);
     printf("\t%10u afs_gsymlink\n", cmp->callInfo.C_afs_gsymlink);
+    printf("\t%10u printgnode\n", cmp->callInfo.C_printgnode);
+    printf("\t%10u HaveGFSLock\n", cmp->callInfo.C_HaveGFSLock);
     printf("\t%10u afs_namei\n", cmp->callInfo.C_afs_namei);
+    printf("\t%10u AddGFSLock\n", cmp->callInfo.C_AddGFSLock);
+    printf("\t%10u RemoveGFSLock\n", cmp->callInfo.C_RemoveGFSLock);
+    printf("\t%10u afs_grlock\n", cmp->callInfo.C_afs_grlock);
+    printf("\t%10u afs_gumount\n", cmp->callInfo.C_afs_gumount);
     printf("\t%10u afs_gmount\n", cmp->callInfo.C_afs_gmount);
     printf("\t%10u afs_gget\n", cmp->callInfo.C_afs_gget);
     printf("\t%10u afs_glink\n", cmp->callInfo.C_afs_glink);
+    printf("\t%10u afs_sbupdate\n", cmp->callInfo.C_afs_sbupdate);
     printf("\t%10u afs_gmkdir\n", cmp->callInfo.C_afs_gmkdir);
     printf("\t%10u afs_unlink\n", cmp->callInfo.C_afs_unlink);
     printf("\t%10u afs_grmdir\n", cmp->callInfo.C_afs_grmdir);
@@ -330,25 +368,67 @@ print_cmCallStats(void)
     printf("\t%10u afs_grename\n", cmp->callInfo.C_afs_grename);
     printf("\t%10u afs_rele\n", cmp->callInfo.C_afs_rele);
     printf("\t%10u afs_syncgp\n", cmp->callInfo.C_afs_syncgp);
+    printf("\t%10u afs_gfshack\n", cmp->callInfo.C_afs_gfshack);
     printf("\t%10u afs_getval\n", cmp->callInfo.C_afs_getval);
     printf("\t%10u afs_trunc\n", cmp->callInfo.C_afs_trunc);
     printf("\t%10u afs_rwgp\n", cmp->callInfo.C_afs_rwgp);
     printf("\t%10u afs_stat\n", cmp->callInfo.C_afs_stat);
+    printf("\t%10u hpsobind\n", cmp->callInfo.C_hpsobind);
+    printf("\t%10u hpsoclose\n", cmp->callInfo.C_hpsoclose);
+    printf("\t%10u hpsocreate\n", cmp->callInfo.C_hpsocreate);
+    printf("\t%10u hpsoreserve\n", cmp->callInfo.C_hpsoreserve);
     printf("\t%10u afsc_link\n", cmp->callInfo.C_afsc_link);
+    printf("\t%10u devtovfs\n", cmp->callInfo.C_devtovfs);
     printf("\t%10u afs_vfs_mount\n", cmp->callInfo.C_afs_vfs_mount);
     printf("\t%10u afs_uniqtime\n", cmp->callInfo.C_afs_uniqtime);
     printf("\t%10u iopen\n", cmp->callInfo.C_iopen);
     printf("\t%10u idec\n", cmp->callInfo.C_idec);
     printf("\t%10u iinc\n", cmp->callInfo.C_iinc);
+    printf("\t%10u oiread\n", cmp->callInfo.C_oiread);
+    printf("\t%10u AHash\n", cmp->callInfo.C_AHash);
+    printf("\t%10u QTOA\n", cmp->callInfo.C_QTOA);
+    printf("\t%10u afs_FindPartByDev\n", cmp->callInfo.C_afs_FindPartByDev);
+    printf("\t%10u aux_init\n", cmp->callInfo.C_aux_init);
+    printf("\t%10u afs_GetNewPart\n", cmp->callInfo.C_afs_GetNewPart);
+    printf("\t%10u afs_InitAuxVolFile\n",
+	   cmp->callInfo.C_afs_InitAuxVolFile);
+    printf("\t%10u afs_CreateAuxEntry\n",
+	   cmp->callInfo.C_afs_CreateAuxEntry);
+    printf("\t%10u afs_GetAuxSlot\n", cmp->callInfo.C_afs_GetAuxSlot);
+    printf("\t%10u afs_GetDownAux\n", cmp->callInfo.C_afs_GetDownAux);
+    printf("\t%10u afs_FlushAuxCache\n", cmp->callInfo.C_afs_FlushAuxCache);
+    printf("\t%10u afs_GetAuxInode\n", cmp->callInfo.C_afs_GetAuxInode);
+    printf("\t%10u afs_PutAuxInode\n", cmp->callInfo.C_afs_PutAuxInode);
+    printf("\t%10u afs_ReadAuxInode\n", cmp->callInfo.C_afs_ReadAuxInode);
+    printf("\t%10u afs_WriteAuxInode\n", cmp->callInfo.C_afs_WriteAuxInode);
+    printf("\t%10u afs_auxcall\n", cmp->callInfo.C_afs_auxcall);
+    printf("\t%10u tmpdbg_auxtbl\n", cmp->callInfo.C_tmpdbg_auxtbl);
+    printf("\t%10u tmpdbg_parttbl\n", cmp->callInfo.C_tmpdbg_parttbl);
     printf("\t%10u ireadwrite\n", cmp->callInfo.C_ireadwrite);
     printf("\t%10u iread\n", cmp->callInfo.C_iread);
+    printf("\t%10u getinode\n", cmp->callInfo.C_getinode);
+    printf("\t%10u trygetfs\n", cmp->callInfo.C_trygetfs);
     printf("\t%10u iwrite\n", cmp->callInfo.C_iwrite);
     printf("\t%10u iforget\n", cmp->callInfo.C_iforget);
+    printf("\t%10u Lock_Init\n", cmp->callInfo.C_Lock_Init);
+    printf("\t%10u Lock_Obtain\n", cmp->callInfo.C_Lock_Obtain);
+    printf("\t%10u Lock_ReleaseR\n", cmp->callInfo.C_Lock_ReleaseR);
+    printf("\t%10u Lock_ReleaseW\n", cmp->callInfo.C_Lock_ReleaseW);
+    printf("\t%10u afs_BozonLock\n", cmp->callInfo.C_afs_BozonLock);
+    printf("\t%10u afs_BozonUnlock\n", cmp->callInfo.C_afs_BozonUnlock);
     printf("\t%10u icreate\n", cmp->callInfo.C_icreate);
     printf("\t%10u igetinode\n", cmp->callInfo.C_igetinode);
     printf("\t%10u osi_SleepR\n", cmp->callInfo.C_osi_SleepR);
     printf("\t%10u osi_SleepS\n", cmp->callInfo.C_osi_SleepS);
     printf("\t%10u osi_SleepW\n", cmp->callInfo.C_osi_SleepW);
+    printf("\t%10u afs_BozonInit\n", cmp->callInfo.C_afs_BozonInit);
+    printf("\t%10u afs_CheckBozonLock\n",
+	   cmp->callInfo.C_afs_CheckBozonLock);
+    printf("\t%10u afs_CheckBozonLockBlocking\n",
+	   cmp->callInfo.C_afs_CheckBozonLockBlocking);
+    printf("\t%10u xxxinit\n", cmp->callInfo.C_xxxinit);
+    printf("\t%10u KernelEntry\n", cmp->callInfo.C_KernelEntry);
+    printf("\t%10u afs_InitMemCache\n", cmp->callInfo.C_afs_InitMemCache);
     printf("\t%10u osi_Sleep\n", cmp->callInfo.C_osi_Sleep);
     printf("\t%10u afs_LookupMCE\n", cmp->callInfo.C_afs_LookupMCE);
     printf("\t%10u afs_MemReadBlk\n", cmp->callInfo.C_afs_MemReadBlk);
@@ -357,6 +437,9 @@ print_cmCallStats(void)
     printf("\t%10u afs_MemWriteUIO\n", cmp->callInfo.C_afs_MemWriteUIO);
     printf("\t%10u afs_MemCacheStoreProc\n",
 	   cmp->callInfo.C_afs_MemCacheStoreProc);
+    printf("\t%10u afs_vnode_pager_create\n",
+	   cmp->callInfo.C_afs_vnode_pager_create);
+    printf("\t%10u next_KernelEntry\n", cmp->callInfo.C_next_KernelEntry);
     printf("\t%10u afs_MemCacheFetchProc\n",
 	   cmp->callInfo.C_afs_MemCacheFetchProc);
     printf("\t%10u afs_MemCacheTruncate\n",
@@ -375,8 +458,19 @@ print_cmCallStats(void)
     printf("\t%10u afs_nfsclient_hold\n", cmp->callInfo.C_afs_nfsclient_hold);
     printf("\t%10u afs_nfsclient_stats\n",
 	   cmp->callInfo.C_afs_nfsclient_stats);
+    printf("\t%10u afs_nfsclient_shutdown\n",
+	   cmp->callInfo.C_afs_nfsclient_shutdown);
+    printf("\t%10u afs_rfs_readdir_fixup\n",
+	   cmp->callInfo.C_afs_rfs_readdir_fixup);
     printf("\t%10u afs_nfsclient_sysname\n",
 	   cmp->callInfo.C_afs_nfsclient_sysname);
+    printf("\t%10u afs_xnfs_svc\n", cmp->callInfo.C_afs_xnfs_svc);
+    printf("\t%10u afs_xdr_putrddirres\n",
+	   cmp->callInfo.C_afs_xdr_putrddirres);
+    printf("\t%10u afs_rfs_readdir\n", cmp->callInfo.C_afs_rfs_readdir);
+    printf("\t%10u afs_rfs_rddirfree\n", cmp->callInfo.C_afs_rfs_rddirfree);
+    printf("\t%10u rfs_dupcreate\n", cmp->callInfo.C_rfs_dupcreate);
+    printf("\t%10u rfs_dupsetattr\n", cmp->callInfo.C_rfs_dupsetattr);
     printf("\t%10u afs_rfs_dispatch\n", cmp->callInfo.C_afs_rfs_dispatch);
     printf("\t%10u afs_nfs2afscall\n", cmp->callInfo.C_Nfs2AfsCall);
     printf("\t%10u afs_sun_xuntext\n", cmp->callInfo.C_afs_sun_xuntext);
@@ -390,6 +484,7 @@ print_cmCallStats(void)
     printf("\t%10u osi_Alloc\n", cmp->callInfo.C_osi_Alloc);
     printf("\t%10u osi_SetTime\n", cmp->callInfo.C_osi_SetTime);
     printf("\t%10u osi_Dump\n", cmp->callInfo.C_osi_Dump);
+    printf("\t%10u shutdown_osi\n", cmp->callInfo.C_shutdown_osi);
     printf("\t%10u osi_Free\n", cmp->callInfo.C_osi_Free);
     printf("\t%10u osi_UFSOpen\n", cmp->callInfo.C_osi_UFSOpen);
     printf("\t%10u osi_Close\n", cmp->callInfo.C_osi_Close);
@@ -397,30 +492,43 @@ print_cmCallStats(void)
     printf("\t%10u osi_Truncate\n", cmp->callInfo.C_osi_Truncate);
     printf("\t%10u osi_Read\n", cmp->callInfo.C_osi_Read);
     printf("\t%10u osi_Write\n", cmp->callInfo.C_osi_Write);
+    printf("\t%10u shutdown_osifile\n", cmp->callInfo.C_shutdown_osifile);
     printf("\t%10u osi_MapStrategy\n", cmp->callInfo.C_osi_MapStrategy);
     printf("\t%10u osi_AllocLargeSpace\n",
 	   cmp->callInfo.C_osi_AllocLargeSpace);
     printf("\t%10u osi_FreeLargeSpace\n", cmp->callInfo.C_osi_FreeLargeSpace);
     printf("\t%10u osi_AllocSmallSpace\n",
 	   cmp->callInfo.C_osi_AllocSmallSpace);
+    printf("\t%10u pkt_iodone\n", cmp->callInfo.C_pkt_iodone);
+    printf("\t%10u shutdown_osinet\n", cmp->callInfo.C_shutdown_osinet);
+    printf("\t%10u afs_cs\n", cmp->callInfo.C_afs_cs);
     printf("\t%10u osi_FreeSmallSpace\n", cmp->callInfo.C_osi_FreeSmallSpace);
     printf("\t%10u osi_CloseToTheEdge\n", cmp->callInfo.C_osi_CloseToTheEdge);
     printf("\t%10u osi_xgreedy\n", cmp->callInfo.C_osi_xgreedy);
     printf("\t%10u osi_FreeSocket\n", cmp->callInfo.C_osi_FreeSocket);
+    printf("\t%10u trysblock\n", cmp->callInfo.C_trysblock);
     printf("\t%10u osi_NewSocket\n", cmp->callInfo.C_osi_NewSocket);
     printf("\t%10u osi_NetSend\n", cmp->callInfo.C_osi_NetSend);
     printf("\t%10u WaitHack\n", cmp->callInfo.C_WaitHack);
+    printf("\t%10u osi_InitWaitHandle\n",
+	   cmp->callInfo.C_osi_InitWaitHandle);
     printf("\t%10u osi_CancelWait\n", cmp->callInfo.C_osi_CancelWait);
     printf("\t%10u osi_Wakeup\n", cmp->callInfo.C_osi_Wakeup);
     printf("\t%10u osi_Wait\n", cmp->callInfo.C_osi_Wait);
+    printf("\t%10u dirp_SetCacheDev\n", cmp->callInfo.C_dirp_SetCacheDev);
+    printf("\t%10u Die\n", cmp->callInfo.C_Die);
     printf("\t%10u dirp_Read\n", cmp->callInfo.C_dirp_Read);
     printf("\t%10u dirp_Cpy\n", cmp->callInfo.C_dirp_Cpy);
     printf("\t%10u dirp_Eq\n", cmp->callInfo.C_dirp_Eq);
     printf("\t%10u dirp_Write\n", cmp->callInfo.C_dirp_Write);
     printf("\t%10u dirp_Zap\n", cmp->callInfo.C_dirp_Zap);
     printf("\t%10u afs_ioctl\n", cmp->callInfo.C_afs_ioctl);
+    printf("\t%10u _AFSIOCTL\n", cmp->callInfo.C__AFSIOCTL);
+    printf("\t%10u _VALIDAFSIOCTL\n", cmp->callInfo.C__VALIDAFSIOCTL);
     printf("\t%10u handleIoctl\n", cmp->callInfo.C_HandleIoctl);
     printf("\t%10u afs_xioctl\n", cmp->callInfo.C_afs_xioctl);
+    printf("\t%10u afs_syscall_pioctl\n",
+	   cmp->callInfo.C_afs_syscall_pioctl);
     printf("\t%10u afs_pioctl\n", cmp->callInfo.C_afs_pioctl);
     printf("\t%10u HandlePioctl\n", cmp->callInfo.C_HandlePioctl);
     printf("\t%10u PGetVolumeStatus\n", cmp->callInfo.C_PGetVolumeStatus);
@@ -431,6 +539,7 @@ print_cmCallStats(void)
     printf("\t%10u PGetTokens\n", cmp->callInfo.C_PGetTokens);
     printf("\t%10u PSetTokens\n", cmp->callInfo.C_PSetTokens);
     printf("\t%10u PUnlog\n", cmp->callInfo.C_PUnlog);
+    printf("\t%10u PMariner\n", cmp->callInfo.C_PMariner);
     printf("\t%10u PCheckServers\n", cmp->callInfo.C_PCheckServers);
     printf("\t%10u PCheckAuth\n", cmp->callInfo.C_PCheckAuth);
     printf("\t%10u PCheckVolNames\n", cmp->callInfo.C_PCheckVolNames);
@@ -454,19 +563,26 @@ print_cmCallStats(void)
     printf("\t%10u PVenusLogging\n", cmp->callInfo.C_PVenusLogging);
     printf("\t%10u PGetAcl\n", cmp->callInfo.C_PGetAcl);
     printf("\t%10u PGetFID\n", cmp->callInfo.C_PGetFID);
+    printf("\t%10u PBogus\n", cmp->callInfo.C_PBogus);
     printf("\t%10u PSetAcl\n", cmp->callInfo.C_PSetAcl);
     printf("\t%10u PGetFileCell\n", cmp->callInfo.C_PGetFileCell);
+    printf("\t%10u PNoop\n", cmp->callInfo.C_PNoop);
     printf("\t%10u PGetWSCell\n", cmp->callInfo.C_PGetWSCell);
+    printf("\t%10u afs_warn\n", cmp->callInfo.C_afs_warn);
+    printf("\t%10u afs_warnuser\n", cmp->callInfo.C_afs_warnuser);
     printf("\t%10u PGetSPrefs\n", cmp->callInfo.C_PGetSPrefs);
     printf("\t%10u PSetSPrefs\n", cmp->callInfo.C_PSetSPrefs);
     printf("\t%10u afs_ResetAccessCache\n",
 	   cmp->callInfo.C_afs_ResetAccessCache);
     printf("\t%10u afs_FindUser\n", cmp->callInfo.C_afs_FindUser);
     printf("\t%10u afs_GetUser\n", cmp->callInfo.C_afs_GetUser);
+    printf("\t%10u VSleep\n", cmp->callInfo.C_VSleep);
     printf("\t%10u afs_GCUserData\n", cmp->callInfo.C_afs_GCUserData);
     printf("\t%10u afs_PutUser\n", cmp->callInfo.C_afs_PutUser);
     printf("\t%10u afs_SetPrimary\n", cmp->callInfo.C_afs_SetPrimary);
     printf("\t%10u afs_ResetUserConns\n", cmp->callInfo.C_afs_ResetUserConns);
+    printf("\t%10u afs_MarinerLog\n", cmp->callInfo.C_afs_MarinerLog);
+    printf("\t%10u afs_vtoi\n", cmp->callInfo.C_afs_vtoi);
     printf("\t%10u afs_RemoveUserConns\n", cmp->callInfo.C_RemoveUserConns);
     printf("\t%10u afs_ResourceInit\n", cmp->callInfo.C_afs_ResourceInit);
     printf("\t%10u afs_GetCell\n", cmp->callInfo.C_afs_GetCell);
@@ -480,14 +596,24 @@ print_cmCallStats(void)
     printf("\t%10u afs_PutVolume\n", cmp->callInfo.C_afs_PutVolume);
     printf("\t%10u afs_GetVolumeByName\n",
 	   cmp->callInfo.C_afs_GetVolumeByName);
+    printf("\t%10u ranstage\n", cmp->callInfo.C_ranstage);
     printf("\t%10u afs_random\n", cmp->callInfo.C_afs_random);
     printf("\t%10u InstallVolumeEntry\n", cmp->callInfo.C_InstallVolumeEntry);
     printf("\t%10u InstallVolumeInfo\n", cmp->callInfo.C_InstallVolumeInfo);
+    printf("\t%10u StartLogFile\n", cmp->callInfo.C_StartLogFile);
+    printf("\t%10u afs_SetLogFile\n", cmp->callInfo.C_afs_SetLogFile);
+    printf("\t%10u EndLogFile\n", cmp->callInfo.C_EndLogFile);
+    printf("\t%10u afs_dp\n", cmp->callInfo.C_afs_dp);
+    printf("\t%10u fprf\n", cmp->callInfo.C_fprf);
+    printf("\t%10u fprint\n", cmp->callInfo.C_fprint);
+    printf("\t%10u fprintn\n", cmp->callInfo.C_fprintn);
     printf("\t%10u afs_ResetVolumeInfo\n",
 	   cmp->callInfo.C_afs_ResetVolumeInfo);
     printf("\t%10u afs_FindServer\n", cmp->callInfo.C_afs_FindServer);
     printf("\t%10u afs_GetServer\n", cmp->callInfo.C_afs_GetServer);
     printf("\t%10u afs_SortServers\n", cmp->callInfo.C_afs_SortServers);
+    printf("\t%10u afs_AddToMean\n", cmp->callInfo.C_afs_AddToMean);
+    printf("\t%10u afs_GetCMStat\n", cmp->callInfo.C_afs_GetCMStat);
     printf("\t%10u afs_CheckServers\n", cmp->callInfo.C_afs_CheckServers);
     printf("\t%10u ServerDown\n", cmp->callInfo.C_ServerDown);
     printf("\t%10u afs_Conn\n", cmp->callInfo.C_afs_Conn);
@@ -495,7 +621,10 @@ print_cmCallStats(void)
     printf("\t%10u afs_ConnByHost\n", cmp->callInfo.C_afs_ConnByHost);
     printf("\t%10u afs_ConnByMHosts\n", cmp->callInfo.C_afs_ConnByMHosts);
     printf("\t%10u afs_Analyze\n", cmp->callInfo.C_afs_Analyze);
+    printf("\t%10u puttofile\n", cmp->callInfo.C_puttofile);
+    printf("\t%10u shutdown_AFS\n", cmp->callInfo.C_shutdown_AFS);
     printf("\t%10u afs_CheckLocks\n", cmp->callInfo.C_afs_CheckLocks);
+    printf("\t%10u haveCallBacksFrom\n", cmp->callInfo.C_HaveCallBacksFrom);
     printf("\t%10u CheckVLServer\n", cmp->callInfo.C_CheckVLServer);
     printf("\t%10u afs_CheckCacheResets\n",
 	   cmp->callInfo.C_afs_CheckCacheResets);
@@ -503,10 +632,14 @@ print_cmCallStats(void)
 	   cmp->callInfo.C_afs_CheckVolumeNames);
     printf("\t%10u afs_CheckCode\n", cmp->callInfo.C_afs_CheckCode);
     printf("\t%10u afs_CopyError\n", cmp->callInfo.C_afs_CopyError);
+    printf("\t%10u afs_cv2string\n", cmp->callInfo.C_afs_cv2string);
+    printf("\t%10u afs_FindVolCache\n", cmp->callInfo.C_afs_FindVolCache);
     printf("\t%10u afs_FinalizeReq\n", cmp->callInfo.C_afs_FinalizeReq);
     printf("\t%10u afs_GetVolCache\n", cmp->callInfo.C_afs_GetVolCache);
     printf("\t%10u afs_GetVolSlot\n", cmp->callInfo.C_afs_GetVolSlot);
     printf("\t%10u afs_UFSGetVolSlot\n", cmp->callInfo.C_afs_UFSGetVolSlot);
+    printf("\t%10u print_internet_address\n",
+	   cmp->callInfo.C_print_internet_address);
     printf("\t%10u afs_MemGetVolSlot\n", cmp->callInfo.C_afs_MemGetVolSlot);
     printf("\t%10u afs_WriteVolCache\n", cmp->callInfo.C_afs_WriteVolCache);
     printf("\t%10u haveCallbacksfrom\n", cmp->callInfo.C_HaveCallBacksFrom);
@@ -514,19 +647,27 @@ print_cmCallStats(void)
     printf("\t%10u afs_putpage\n", cmp->callInfo.C_afs_putpage);
     printf("\t%10u afs_nfsrdwr\n", cmp->callInfo.C_afs_nfsrdwr);
     printf("\t%10u afs_map\n", cmp->callInfo.C_afs_map);
+    printf("\t%10u afs_cntl\n", cmp->callInfo.C_afs_cntl);
+    printf("\t%10u afs_dump\n", cmp->callInfo.C_afs_dump);
+    printf("\t%10u afs_realvp\n", cmp->callInfo.C_afs_realvp);
     printf("\t%10u afs_cmp\n", cmp->callInfo.C_afs_cmp);
+    printf("\t%10u afsinit\n", cmp->callInfo.C_afsinit);
     printf("\t%10u afs_PageLeft\n", cmp->callInfo.C_afs_PageLeft);
     printf("\t%10u afs_mount\n", cmp->callInfo.C_afs_mount);
     printf("\t%10u afs_unmount\n", cmp->callInfo.C_afs_unmount);
     printf("\t%10u afs_root\n", cmp->callInfo.C_afs_root);
     printf("\t%10u afs_statfs\n", cmp->callInfo.C_afs_statfs);
     printf("\t%10u afs_sync\n", cmp->callInfo.C_afs_sync);
+    printf("\t%10u afs_mountroot\n", cmp->callInfo.C_afs_mountroot);
+    printf("\t%10u afs_swapvp\n", cmp->callInfo.C_afs_swapvp);
     printf("\t%10u afs_vget\n", cmp->callInfo.C_afs_vget);
+    printf("\t%10u afs_noop\n", cmp->callInfo.C_afs_noop);
     printf("\t%10u afs_index\n", cmp->callInfo.C_afs_index);
     printf("\t%10u afs_setpag\n", cmp->callInfo.C_afs_setpag);
     printf("\t%10u genpag\n", cmp->callInfo.C_genpag);
     printf("\t%10u getpag\n", cmp->callInfo.C_getpag);
     printf("\t%10u genpag\n", cmp->callInfo.C_genpag);
+    printf("\t%10u afs_badop\n", cmp->callInfo.C_afs_badop);
     printf("\t%10u afs_GetMariner\n", cmp->callInfo.C_afs_GetMariner);
     printf("\t%10u afs_AddMarinerName\n", cmp->callInfo.C_afs_AddMarinerName);
     printf("\t%10u afs_open\n", cmp->callInfo.C_afs_open);
@@ -536,10 +677,15 @@ print_cmCallStats(void)
     printf("\t%10u afs_UFSwrite\n", cmp->callInfo.C_afs_UFSWrite);
     printf("\t%10u afs_Memwrite\n", cmp->callInfo.C_afs_MemWrite);
     printf("\t%10u afs_rdwr\n", cmp->callInfo.C_afs_rdwr);
+    printf("\t%10u FIXUPSTUPIDINODE\n", cmp->callInfo.C_FIXUPSTUPIDINODE);
     printf("\t%10u afs_read\n", cmp->callInfo.C_afs_read);
     printf("\t%10u afs_UFSread\n", cmp->callInfo.C_afs_UFSRead);
     printf("\t%10u afs_Memread\n", cmp->callInfo.C_afs_MemRead);
     printf("\t%10u afs_CopyOutAttrs\n", cmp->callInfo.C_afs_CopyOutAttrs);
+    printf("\t%10u ENameOK\n", cmp->callInfo.C_ENameOK);
+    printf("\t%10u HandleAtName\n", cmp->callInfo.C_HandleAtName);
+    printf("\t%10u getsysname\n", cmp->callInfo.C_getsysname);
+    printf("\t%10u strcat\n", cmp->callInfo.C_strcat);
     printf("\t%10u afs_access\n", cmp->callInfo.C_afs_access);
     printf("\t%10u afs_getattr\n", cmp->callInfo.C_afs_getattr);
     printf("\t%10u afs_setattr\n", cmp->callInfo.C_afs_setattr);
@@ -547,12 +693,20 @@ print_cmCallStats(void)
     printf("\t%10u EvalMountPoint\n", cmp->callInfo.C_EvalMountPoint);
     printf("\t%10u afs_lookup\n", cmp->callInfo.C_afs_lookup);
     printf("\t%10u afs_create\n", cmp->callInfo.C_afs_create);
+    printf("\t%10u FetchWholeEnchilada\n",
+	   cmp->callInfo.C_FetchWholeEnchilada);
     printf("\t%10u afs_LocalHero\n", cmp->callInfo.C_afs_LocalHero);
     printf("\t%10u afs_remove\n", cmp->callInfo.C_afs_remove);
     printf("\t%10u afs_link\n", cmp->callInfo.C_afs_link);
     printf("\t%10u afs_rename\n", cmp->callInfo.C_afs_rename);
     printf("\t%10u afs_InitReq\n", cmp->callInfo.C_afs_InitReq);
+    printf("\t%10u BlobScan\n", cmp->callInfo.C_BlobScan);
     printf("\t%10u afs_mkdir\n", cmp->callInfo.C_afs_mkdir);
+    printf("\t%10u RecLen\n", cmp->callInfo.C_RecLen);
+    printf("\t%10u RoundToInt\n", cmp->callInfo.C_RoundToInt);
+    printf("\t%10u afs_readdir_with_offlist\n",
+	   cmp->callInfo.C_afs_readdir_with_offlist);
+    printf("\t%10u DIRSIZ_LEN\n", cmp->callInfo.C_DIRSIZ_LEN);
     printf("\t%10u afs_rmdir\n", cmp->callInfo.C_afs_rmdir);
     printf("\t%10u afs_readdir\n", cmp->callInfo.C_afs_readdir);
     printf("\t%10u afs_read1dir\n", cmp->callInfo.C_afs_read1dir);
@@ -576,6 +730,7 @@ print_cmCallStats(void)
     printf("\t%10u afs_FakeClose\n", cmp->callInfo.C_afs_FakeClose);
     printf("\t%10u afs_StoreOnLastReference\n",
 	   cmp->callInfo.C_afs_StoreOnLastReference);
+    printf("\t%10u shutdown_vnodeops\n", cmp->callInfo.C_shutdown_vnodeops);
     printf("\t%10u afs_AccessOK\n", cmp->callInfo.C_afs_AccessOK);
     printf("\t%10u afs_GetAccessBits\n", cmp->callInfo.C_afs_GetAccessBits);
     printf("\t%10u afsio_copy\n", cmp->callInfo.C_afsio_copy);
@@ -590,22 +745,30 @@ print_cmCallStats(void)
 	   cmp->callInfo.C_afs_get_pag_from_groups);
     printf("\t%10u AddPag\n", cmp->callInfo.C_AddPag);
     printf("\t%10u PagInCred\n", cmp->callInfo.C_PagInCred);
+    printf("\t%10u setpag\n", cmp->callInfo.C_setpag);
+    printf("\t%10u afs_setgroups\n", cmp->callInfo.C_afs_setgroups);
     printf("\t%10u afs_getgroups\n", cmp->callInfo.C_afs_getgroups);
     printf("\t%10u afs_page_in\n", cmp->callInfo.C_afs_page_in);
     printf("\t%10u afs_page_out\n", cmp->callInfo.C_afs_page_out);
     printf("\t%10u afs_AdvanceFD\n", cmp->callInfo.C_afs_AdvanceFD);
     printf("\t%10u afs_lockf\n", cmp->callInfo.C_afs_lockf);
     printf("\t%10u afs_xsetgroups\n", cmp->callInfo.C_afs_xsetgroups);
+    printf("\t%10u DoLockWarning\n", cmp->callInfo.C_DoLockWarning);
     printf("\t%10u afs_nlinks\n", cmp->callInfo.C_afs_nlinks);
     printf("\t%10u afs_lockctl\n", cmp->callInfo.C_afs_lockctl);
     printf("\t%10u afs_xflock\n", cmp->callInfo.C_afs_xflock);
     printf("\t%10u PGetCPrefs\n", cmp->callInfo.C_PGetCPrefs);
+    printf("\t%10u SRXAFSCB_WhoAreYou\n",
+	   cmp->callInfo.C_SRXAFSCB_WhoAreYou);
+    printf("\t%10u afs_DiscardDCache\n", cmp->callInfo.C_afs_DiscardDCache);
+    printf("\t%10u afs_FreeDiscardedDCache\n",
+	   cmp->callInfo.C_afs_FreeDiscardedDCache);
+    printf("\t%10u afs_MaybeFreeDiscardedDCache\n",
+	   cmp->callInfo.C_afs_MaybeFreeDiscardedDCache);
     printf("\t%10u PSetCPrefs\n", cmp->callInfo.C_PSetCPrefs);
-#ifdef	AFS_HPUX_ENV
     printf("\t%10u afs_pagein\n", cmp->callInfo.C_afs_pagein);
     printf("\t%10u afs_pageout\n", cmp->callInfo.C_afs_pageout);
     printf("\t%10u afs_hp_strategy\n", cmp->callInfo.C_afs_hp_strategy);
-#endif
     printf("\t%10u PFlushMount\n", cmp->callInfo.C_PFlushMount);
     printf("\t%10u SRXAFSCB_GetServerPrefs\n",
 	   cmp->callInfo.C_SRXAFSCB_GetServerPrefs);
@@ -621,6 +784,8 @@ print_cmCallStats(void)
     printf("\t%10u SRXAFSCB_GetCellByNum\n",
 	   cmp->callInfo.C_SRXAFSCB_GetCellByNum);
     printf("\t%10u BPrefetchNoCache\n", cmp->callInfo.C_BPrefetchNoCache);
+    printf("\t%10u PSetTokens2\n", cmp->callInfo.C_PSetTokens2);
+    printf("\t%10u PPrefetchFromTape\n", cmp->callInfo.C_PPrefetchFromTape);
     printf("\t%10u afs_ReadNoCache\n", cmp->callInfo.C_afs_ReadNoCache);
 }
 
@@ -1125,6 +1290,19 @@ CM_Handler(void)
 	return (0);
     }
 
+    if (debugging_on) {
+        int i;
+        int numInt32s = xstat_cm_Results.data.AFSCB_CollData_len;
+        afs_int32 *entry = xstat_cm_Results.data.AFSCB_CollData_val;
+
+        printf("debug: got collection number %d\n", xstat_cm_Results.collectionNumber);
+        printf("debug: collection data length is %d\n", numInt32s);
+        for (i = 0; i < numInt32s; i++) {
+            printf("debug: entry %d %u\n", i, entry[i]);
+        }
+        printf("\n");
+    }
+
     switch (xstat_cm_Results.collectionNumber) {
     case AFSCB_XSTATSCOLL_CALL_INFO:
 	/* Why was this commented out in 3.3 ? */
diff --git a/src/xstat/xstat_fs_test.c b/src/xstat/xstat_fs_test.c
index ba9677b..63f382c 100644
--- a/src/xstat/xstat_fs_test.c
+++ b/src/xstat/xstat_fs_test.c
@@ -537,6 +537,19 @@ FS_Handler(void)
 	return (0);
     }
 
+    if (debugging_on) {
+        int i;
+        int numInt32s = xstat_fs_Results.data.AFS_CollData_len;
+        afs_int32 *entry = xstat_fs_Results.data.AFS_CollData_val;
+
+        printf("debug: got collection number %d\n", xstat_fs_Results.collectionNumber);
+        printf("debug: collection data length is %d\n", numInt32s);
+        for (i = 0; i < numInt32s; i++) {
+            printf("debug: entry %d %u\n", i, entry[i]);
+        }
+        printf("\n");
+    }
+
     switch (xstat_fs_Results.collectionNumber) {
     case AFS_XSTATSCOLL_CALL_INFO:
 	PrintCallInfo();
