Index: openafs/src/afs/VNOPS/afs_vnop_read.c
diff -c openafs/src/afs/VNOPS/afs_vnop_read.c:1.26.2.5 openafs/src/afs/VNOPS/afs_vnop_read.c:1.26.2.6
*** openafs/src/afs/VNOPS/afs_vnop_read.c:1.26.2.5	Thu Nov 29 13:36:12 2007
--- openafs/src/afs/VNOPS/afs_vnop_read.c	Sat Apr 26 23:54:27 2008
***************
*** 19,25 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.26.2.5 2007/11/29 18:36:12 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 19,25 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.26.2.6 2008/04/27 03:54:27 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 120,125 ****
--- 120,126 ----
      if (filePos >= avc->m.Length) {
  	if (len > AFS_ZEROS)
  	    len = sizeof(afs_zeros);	/* and in 0 buffer */
+ 	len = 0;
  #ifdef AFS_DARWIN80_ENV
  	trimlen = len;
  	tuiop = afsio_darwin_partialcopy(auio, trimlen);
Index: openafs/src/packaging/RedHat/openafs.spec.in
diff -c openafs/src/packaging/RedHat/openafs.spec.in:1.1.2.21 openafs/src/packaging/RedHat/openafs.spec.in:1.1.2.22
*** openafs/src/packaging/RedHat/openafs.spec.in:1.1.2.21	Tue Apr 22 08:50:56 2008
--- openafs/src/packaging/RedHat/openafs.spec.in	Sun Apr 27 00:00:46 2008
***************
*** 1,4 ****
! # Openafs Spec $Revision: 1.1.2.21 $
  
  %define afsvers @VERSION@
  %define pkgvers @LINUX_PKGVER@
--- 1,4 ----
! # Openafs Spec $Revision: 1.1.2.22 $
  
  %define afsvers @VERSION@
  %define pkgvers @LINUX_PKGVER@
***************
*** 248,254 ****
  Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
  Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
  
! Source20: http://dl.central.org/dl/cellservdb/CellServDB.2007-10-25 
  
  Source30: openafs-kernel-version.sh
  Source996: openafs-kvers-is.sh
--- 248,254 ----
  Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
  Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
  
! Source20: http://dl.central.org/dl/cellservdb/CellServDB.2008-04-23
  
  Source30: openafs-kernel-version.sh
  Source996: openafs-kvers-is.sh
Index: openafs/src/tbutc/Makefile.in
diff -c openafs/src/tbutc/Makefile.in:1.13.2.2 openafs/src/tbutc/Makefile.in:1.13.2.3
*** openafs/src/tbutc/Makefile.in:1.13.2.2	Mon Oct 24 15:06:37 2005
--- openafs/src/tbutc/Makefile.in	Mon Apr 28 12:15:16 2008
***************
*** 24,30 ****
  BUCOORDOBJS=ubik_db_if.o ../bucoord/volstub.o ../bucoord/dlq.o \
  	    status.o ../bucoord/bucoord_errs.o
  
! VOLSEROBJS=vsprocs.o vsutils.o
  VOLSERLIBS=${TOP_LIBDIR}/libvosadmin.a ${TOP_LIBDIR}/libafsadminutil.a
  
  LWPOBJS     =lock.o
--- 24,30 ----
  BUCOORDOBJS=ubik_db_if.o ../bucoord/volstub.o ../bucoord/dlq.o \
  	    status.o ../bucoord/bucoord_errs.o
  
! VOLSEROBJS=vsprocs.o vsutils.o lockprocs.o
  VOLSERLIBS=${TOP_LIBDIR}/libvosadmin.a ${TOP_LIBDIR}/libafsadminutil.a
  
  LWPOBJS     =lock.o
***************
*** 115,120 ****
--- 115,123 ----
  vsprocs.o: ${VOLSER}/vsprocs.c
  	${CC} ${CFLAGS} -c ${VOLSER}/vsprocs.c
  
+ lockprocs.o: ${VOLSER}/lockprocs.c
+ 	${CC} ${CFLAGS} -c ${VOLSER}/lockprocs.c
+ 
  lock.o: ${LWP}/lock.c
  	${CC} ${CFLAGS} -c ${LWP}/lock.c
  
Index: openafs/src/ubik/phys.c
diff -c openafs/src/ubik/phys.c:1.8.2.3 openafs/src/ubik/phys.c:1.8.2.4
*** openafs/src/ubik/phys.c:1.8.2.3	Mon Dec 10 17:46:07 2007
--- openafs/src/ubik/phys.c	Mon Apr 28 17:48:25 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/phys.c,v 1.8.2.3 2007/12/10 22:46:07 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/phys.c,v 1.8.2.4 2008/04/28 21:48:25 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 130,136 ****
  	return EBADF;
      tfd = fdcache;
      for (i = 0; i < MAXFDCACHE; i++, tfd++) {
! 	if (tfd->fd == afd) {
  	    tfd->refCount--;
  	    return 0;
  	}
--- 130,136 ----
  	return EBADF;
      tfd = fdcache;
      for (i = 0; i < MAXFDCACHE; i++, tfd++) {
! 	if (tfd->fd == afd && tfd->fileID != -10000) {
  	    tfd->refCount--;
  	    return 0;
  	}
***************
*** 282,284 ****
--- 282,301 ----
      uphys_close(fd);
      return code;
  }
+ 
+ void
+ uphys_invalidate(register struct ubik_dbase *adbase, afs_int32 afid)
+ {
+     register int i;
+     register struct fdcache *tfd;
+ 
+     /* scan file descr cache */
+     for (tfd = fdcache, i = 0; i < MAXFDCACHE; i++, tfd++) {
+ 	if (afid == tfd->fileID) {
+ 	    tfd->fileID = -10000;
+ 	    if (tfd->fd >= 0 && tfd->refCount == 0)
+ 		close(tfd->fd);
+ 	    return;
+ 	}
+     }
+ }
Index: openafs/src/ubik/recovery.c
diff -c openafs/src/ubik/recovery.c:1.13.2.5 openafs/src/ubik/recovery.c:1.13.2.6
*** openafs/src/ubik/recovery.c:1.13.2.5	Wed Apr  9 12:40:20 2008
--- openafs/src/ubik/recovery.c	Mon Apr 28 17:48:25 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/recovery.c,v 1.13.2.5 2008/04/09 16:40:20 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/recovery.c,v 1.13.2.6 2008/04/28 21:48:25 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 648,653 ****
--- 648,655 ----
  #endif
  		if (!code) 
  		    code = rename(pbuffer, tbuffer);
+ 		if (!code) 
+ 		    code = (*ubik_dbase->open) (ubik_dbase, 0);
  		if (!code)
  #endif
  		/* after data is good, sync disk with correct label */
Index: openafs/src/ubik/remote.c
diff -c openafs/src/ubik/remote.c:1.12.2.6 openafs/src/ubik/remote.c:1.12.2.7
*** openafs/src/ubik/remote.c:1.12.2.6	Wed Feb 20 15:10:39 2008
--- openafs/src/ubik/remote.c	Mon Apr 28 17:48:25 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/remote.c,v 1.12.2.6 2008/02/20 20:10:39 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/remote.c,v 1.12.2.7 2008/04/28 21:48:25 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 615,620 ****
--- 615,622 ----
  #endif
      if (!code) 
  	code = rename(pbuffer, tbuffer);
+     if (!code) 
+ 	code = (*ubik_dbase->open) (ubik_dbase, 0);
      if (!code)
  #endif
      code = (*ubik_dbase->setlabel) (dbase, file, avers);
Index: openafs/src/ubik/ubik.c
diff -c openafs/src/ubik/ubik.c:1.15.2.3 openafs/src/ubik/ubik.c:1.15.2.4
*** openafs/src/ubik/ubik.c:1.15.2.3	Mon Mar 10 18:35:36 2008
--- openafs/src/ubik/ubik.c	Mon Apr 28 17:48:25 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/ubik.c,v 1.15.2.3 2008/03/10 22:35:36 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/ubik.c,v 1.15.2.4 2008/04/28 21:48:25 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 208,214 ****
      tdb->read = uphys_read;
      tdb->write = uphys_write;
      tdb->truncate = uphys_truncate;
!     tdb->open = 0;		/* this function isn't used any more */
      tdb->sync = uphys_sync;
      tdb->stat = uphys_stat;
      tdb->getlabel = uphys_getlabel;
--- 208,214 ----
      tdb->read = uphys_read;
      tdb->write = uphys_write;
      tdb->truncate = uphys_truncate;
!     tdb->open = uphys_invalidate;	/* this function isn't used any more */
      tdb->sync = uphys_sync;
      tdb->stat = uphys_stat;
      tdb->getlabel = uphys_getlabel;
Index: openafs/src/ubik/ubik.p.h
diff -c openafs/src/ubik/ubik.p.h:1.11.2.6 openafs/src/ubik/ubik.p.h:1.11.2.7
*** openafs/src/ubik/ubik.p.h:1.11.2.6	Mon Mar 10 18:35:36 2008
--- openafs/src/ubik/ubik.p.h	Mon Apr 28 17:48:25 2008
***************
*** 303,309 ****
  extern int uphys_setlabel(register struct ubik_dbase *adbase, afs_int32 afile,
  			  struct ubik_version *aversion);
  extern int uphys_sync(register struct ubik_dbase *adbase, afs_int32 afile);
! 
  
  /* recovery.c */
  extern int urecovery_ResetState(void);
--- 303,310 ----
  extern int uphys_setlabel(register struct ubik_dbase *adbase, afs_int32 afile,
  			  struct ubik_version *aversion);
  extern int uphys_sync(register struct ubik_dbase *adbase, afs_int32 afile);
! extern void uphys_invalidate(register struct ubik_dbase *adbase, 
! 			     afs_int32 afid);
  
  /* recovery.c */
  extern int urecovery_ResetState(void);
Index: openafs/src/venus/Makefile.in
diff -c openafs/src/venus/Makefile.in:1.30.2.5 openafs/src/venus/Makefile.in:1.30.2.6
*** openafs/src/venus/Makefile.in:1.30.2.5	Mon Dec 31 19:19:00 2007
--- openafs/src/venus/Makefile.in	Sun Apr 27 23:45:27 2008
***************
*** 283,295 ****
  		${INSTALL} -f ${srcdir}/kdump ${DEST}/etc/kdump32;; \
  	*alpha_linux* ) \
  		${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
! 		${INSTALL} kdump-alpha_linux-${LINUX_VERSION} $@ ;; \
  	*linux* ) \
  		${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
  		${INSTALL} kdump-linux-${LINUX_VERSION} $@-${LINUX_VERSION} ;; \
  	hp_ux11* ) \
  		${INSTALLex} -f ${srcdir}/kdump.sh.hp_ux11 ${DEST}/etc/kdump; \
! 		${INSTALL} -f $? $@;; \
  	*bsd*) \
  		;; \
  	*) \
--- 283,295 ----
  		${INSTALL} -f ${srcdir}/kdump ${DEST}/etc/kdump32;; \
  	*alpha_linux* ) \
  		${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
! 		${INSTALL} kdump-alpha_linux-${LINUX_VERSION} $@-${LINUX_VERSION} ;; \
  	*linux* ) \
  		${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
  		${INSTALL} kdump-linux-${LINUX_VERSION} $@-${LINUX_VERSION} ;; \
  	hp_ux11* ) \
  		${INSTALLex} -f ${srcdir}/kdump.sh.hp_ux11 ${DEST}/etc/kdump; \
! 		${INSTALL} -f $? ${DEST}/etc/kdump32;; \
  	*bsd*) \
  		;; \
  	*) \
***************
*** 357,372 ****
  			do ${INSTALL} $$f ${DESTDIR}${sbindir}/$$f || exit $$? ; \
  		done ;; \
  	sun*_5[789] | sun*_510 ) \
! 		${INSTALLex} -f kdump.sh.solaris7 ${DESTDIR}${sbindir}/kdump32; \
! 		${INSTALL} -f $? $@;; \
  	*linux* ) \
  		${INSTALLex} -f kdump.sh.linux ${DESTDIR}${sbindir}/kdump; \
! 		${INSTALL} $? $@ ;; \
  	hp_ux11* ) \
  		${INSTALLex} -f kdump.sh.hp_ux11 ${DESTDIR}${sbindir}/kdump; \
! 		${INSTALL} -f $? $@;; \
  	*) \
! 		${INSTALL} $? $@ ;; \
  	esac
  
  ${DESTDIR}${sbindir}/kdump64: kdump-build
--- 357,375 ----
  			do ${INSTALL} $$f ${DESTDIR}${sbindir}/$$f || exit $$? ; \
  		done ;; \
  	sun*_5[789] | sun*_510 ) \
! 		${INSTALLex} -f kdump.sh.solaris7 ${DESTDIR}${sbindir}/kdump; \
! 		${INSTALL} -f kdump ${DESTDIR}${sbindir}/kdump32;; \
! 	*alpha_linux* ) \
! 		${INSTALLex} -f kdump.sh.linux ${DESTDIR}${sbindir}/kdump; \
! 		${INSTALL} kdump-alpha_linux-${LINUX_VERSION} $@-${LINUX_VERSION} ;; \
  	*linux* ) \
  		${INSTALLex} -f kdump.sh.linux ${DESTDIR}${sbindir}/kdump; \
! 		${INSTALL} kdump-linux-${LINUX_VERSION} $@-${LINUX_VERSION} ;; \
  	hp_ux11* ) \
  		${INSTALLex} -f kdump.sh.hp_ux11 ${DESTDIR}${sbindir}/kdump; \
! 		${INSTALL} -f kdump ${DESTDIR}${sbindir}/kdump32;; \
  	*) \
! 		${INSTALL} kdump $@ ;; \
  	esac
  
  ${DESTDIR}${sbindir}/kdump64: kdump-build
Index: openafs/src/viced/viced.h
diff -c openafs/src/viced/viced.h:1.6.2.1 openafs/src/viced/viced.h:1.6.2.2
*** openafs/src/viced/viced.h:1.6.2.1	Wed Feb  1 10:59:43 2006
--- openafs/src/viced/viced.h	Wed Apr 23 14:58:09 2008
***************
*** 196,202 ****
  #define DONTPANIC 0
  #define PANIC 1
  
! #define MAX_FILESERVER_THREAD	128	/* max number of threads in fileserver, subject to system limits */
  
  #define FILESERVER_HELPER_THREADS 7	/* Listner, IOMGR, FiveMinute, 
  					 * HostCheck, Signal, min 2 for RXSTATS */
--- 196,202 ----
  #define DONTPANIC 0
  #define PANIC 1
  
! #define MAX_FILESERVER_THREAD	128	/* max number of threads in fileserver, subject to system limits. match to FD_HANDLE_SETASIDE */
  
  #define FILESERVER_HELPER_THREADS 7	/* Listner, IOMGR, FiveMinute, 
  					 * HostCheck, Signal, min 2 for RXSTATS */
Index: openafs/src/vol/ihandle.h
diff -c openafs/src/vol/ihandle.h:1.8.2.2 openafs/src/vol/ihandle.h:1.8.2.3
*** openafs/src/vol/ihandle.h:1.8.2.2	Fri Sep  7 00:05:49 2007
--- openafs/src/vol/ihandle.h	Wed Apr 23 14:58:07 2008
***************
*** 193,199 ****
  #define STREAM_HANDLE_MALLOCSIZE 1
  
  /* Number of file descriptors needed for non-cached I/O */
! #define FD_HANDLE_SETASIDE	64
  
  /* Don't try to have more than 256 files open at once if you are planning
   * to use fopen or fdopen. The FILE structure has an eight bit field for
--- 193,199 ----
  #define STREAM_HANDLE_MALLOCSIZE 1
  
  /* Number of file descriptors needed for non-cached I/O */
! #define FD_HANDLE_SETASIDE	128 /* Match to MAX_FILESERVER_THREAD */
  
  /* Don't try to have more than 256 files open at once if you are planning
   * to use fopen or fdopen. The FILE structure has an eight bit field for
