* Apply upstream CVS deltas:
- STABLE14-background-fsync-consistency-issues-
20090522: file
descriptor handling fixes for the file server.
flag setting and locking around recursive mmap protection.
- STABLE14-memcache-write-on-laststore-20090512: write back dirty
pages on last store with memcache to avoid losing changes.
+ - STABLE14-background-fsync-consistency-issues-20090522: file
+ descriptor handling fixes for the file server.
* Provide an openafs-modules-dkms package that uses DKMS to dynamically
build kernel modules for the local kernel and document this option in
README.modules. This is an alternative to installing
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/ihandle.c,v 1.18.2.6 2008/10/27 23:54:12 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/ihandle.c,v 1.18.2.7 2009/05/22 16:00:46 shadow Exp $");
#include <stdio.h>
#include <sys/types.h>
return 0;
IH_LOCK;
+ ihP->ih_refcnt++; /* must not disappear over unlock */
+ if (ihP->ih_synced) {
+ FdHandle_t *fdP;
+ IH_UNLOCK;
+
+ fdP = IH_OPEN(ihP);
+ if (fdP) {
+ OS_SYNC(fdP->fd_fd);
+ FDH_CLOSE(fdP);
+ }
+
+ IH_LOCK;
+ }
+
assert(ihP->ih_refcnt > 0);
+ ihP->ih_synced = 0;
+
ih_fdclose(ihP);
- IH_UNLOCK;
+ if (ihP->ih_refcnt > 1) {
+ ihP->ih_refcnt--;
+ IH_UNLOCK;
+ } else {
+ IH_UNLOCK;
+ ih_release(ihP);
+ }
return 0;
}
IH_UNLOCK;
fdP = IH_OPEN(ihP);
- if (fdP) OS_SYNC(fdP->fd_fd);
- FDH_CLOSE(fdP);
+ if (fdP) {
+ OS_SYNC(fdP->fd_fd);
+ FDH_CLOSE(fdP);
+ }
IH_LOCK;
}
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.19.2.7 2009/02/17 04:37:59 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.19.2.8 2009/05/22 16:00:46 shadow Exp $");
#include <errno.h>
#include <stdio.h>
for (vnp = VnodeHashTable[i]; vnp; vnp = vnp->hashNext) {
if (vnp->volumePtr == vp) {
IH_REALLYCLOSE(vnp->handle);
- IH_RELEASE(vnp->handle);
}
}
}