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

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


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

Modified Files:
	cm_dcache.c cm_dcache.h 
Log Message:
DELTA 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 follows ---
windows-dcache-store-data-20090511 openafs/src/WINNT/afsd/cm_dcache.c 1.65 1.66
windows-dcache-store-data-20090511 openafs/src/WINNT/afsd/cm_dcache.h 1.10 1.11