Windows: Permit cm_scache rwlock to be dropped when "Stablized"
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 3 Sep 2010 01:05:15 +0000 (21:05 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Mon, 6 Sep 2010 03:56:43 +0000 (20:56 -0700)
commitfa961c02fbb7dc54fa4c02c38dfd07c44eb696d3
tree23472a47d0d302a5369c7a50aeb659e745f4deb0
parentee26ce51f67c7a91d843184374240bbc29e1660b
Windows: Permit cm_scache rwlock to be dropped when "Stablized"

The cm_buf_opts_t cm_BufStabilize() function was implemented
such that holding the cm_scache_t.rw lock had to be exclusively
held until cm_BufUnstablize() was called.  Unfortunately, this
prevents using Stabilize/Unstabilize to protect the cm_scache_t
during Flush operations as the cm_scache_t.rw lock must be
acquired after the cm_buf_t mutex and not before it.

This patchset reimplements the synchronization logic using
the new CM_SCACHEFLAG_SIZESETTING flag and cm_SyncOp().

LICENSE MIT

Change-Id: Iaada83f7f3b75bb3b213b33b2399e900e48a2fbc
Reviewed-on: http://gerrit.openafs.org/2661
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/cm_dcache.c
src/WINNT/afsd/cm_scache.c
src/WINNT/afsd/cm_scache.h