]> git.michaelhowe.org Git - packages/o/openafs.git/commit
windows-dcache-store-data-20090511
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 11 May 2009 17:22:24 +0000 (17:22 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 11 May 2009 17:22:24 +0000 (17:22 +0000)
commit947213da0ee6a0d805f0fc5eaeec0202d0bbffa4
treea66149f2b4f2e3735e00cbdd0b1b5fd2895ce1cd
parent7d530b9080f6dd4d7f7e4555ed6ce855ff81bcaa
windows-dcache-store-data-20090511

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.
src/WINNT/afsd/cm_dcache.c
src/WINNT/afsd/cm_dcache.h