OpenAFS CVS Commit: openafs/src/WINNT/afsd by jaltman

cvs@GRAND.CENTRAL.ORG cvs@GRAND.CENTRAL.ORG
Mon, 11 May 2009 12:22:36 EDT


Update of /cvs/openafs/src/WINNT/afsd
In directory GRAND.CENTRAL.ORG:/home/jaltman/openafs/cvs-1-5/src/WINNT/afsd

Modified Files:
      Tag: openafs-devel-1_5_x
	cm_dcache.c cm_dcache.h 
Log Message:
DELTA DEVEL15-windows-dcache-store-data-20090511
AUTHOR jaltman@secure-endpoints.com
LICENSE MIT

The windows dcache module synchronizes store data operations in
order to prevent multiple simultaneous store data operations against
the same file at the same time by multiple threads.  This is performed
using cm_SyncOp(CM_SCACHESYNC_STOREDATA_EXCL).  However, cm_SetupStoreBIOD()
was being processed prior to the synchronization.  As a result a dirty
buffer could be added to two BIOD lists resulting in the same buffer
contents being written to the file server twice.

This patch moves the cm_SetupStoreBIOD() into the synchronization region.
It also adds a new 'locked' parameter to cm_ReleaseBIOD() that indicates
whether or not the cm_scache_t object is locked when called.  This
permits fewer lock state changes to be used in several cases.


--- DELTA config for openafs-devel-1_5_x follows ---
DEVEL15-windows-dcache-store-data-20090511 openafs/src/WINNT/afsd/cm_dcache.c 1.30.2.35 1.30.2.36
DEVEL15-windows-dcache-store-data-20090511 openafs/src/WINNT/afsd/cm_dcache.h 1.4.4.6 1.4.4.7