Windows: Correct cm_volume locking
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 27 Jan 2011 01:10:57 +0000 (20:10 -0500)
committerJeffrey Altman <jaltman@openafs.org>
Thu, 27 Jan 2011 03:04:34 +0000 (19:04 -0800)
commit962a95c21cc82a8bbb1dc1233c91acd7236fc8e4
tree72e815be21f628434496ecd9eb4c43f1015dd2a4
parent5817a13b84496c087b350be50c17a8b0f9aac9d5
Windows: Correct cm_volume locking

cm_volume_t flags was used for two categories of flags.  The first
protected by the cm_volume_t->rw lock.  The second protected by
the global cm_volumeLock.  Separate the flags field into two
afs_uint16 fields and break the flag space into FLAG and QFLAG.

Add assertions to the volume LRU functions to ensure that they
are always called with cm_volumeLock write-locked.

Correct two locations where cm_AdjustVolumeLRU() was called
read-locked instead of write-locked.

Change-Id: I7991b995a3c981cd5d08d9cbba09badc81518a5a
Reviewed-on: http://gerrit.openafs.org/3760
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/cm_memmap.h
src/WINNT/afsd/cm_volume.c
src/WINNT/afsd/cm_volume.h