]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DEVEL15-windows-dcache-store-data-20090511
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 11 May 2009 17:22:35 +0000 (17:22 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 11 May 2009 17:22:35 +0000 (17:22 +0000)
commit6d90d92c8b67a4290e9678cb652652ee03d5f671
treea6b111cd61481089c49f3825b3c11f009acf1afc
parentdd76e75b7c8c3e378d4f45a9380abdc0aeeba685
DEVEL15-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.

(cherry picked from commit 947213da0ee6a0d805f0fc5eaeec0202d0bbffa4)
src/WINNT/afsd/cm_dcache.c
src/WINNT/afsd/cm_dcache.h