Windows: cm_GetNewSCache drop lock to permit change
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 5 May 2012 23:11:07 +0000 (19:11 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 6 May 2012 15:42:00 +0000 (08:42 -0700)
commit46c1f1391b6e1b95798e183b8f34cba5c074e0ad
treee3c9f871580a081cad7d6696f683d37336a1f69f
parentdbab42ca724668a8d0b0e33dd998fa9312b781d1
Windows: cm_GetNewSCache drop lock to permit change

In cm_GetNewSCache the entire LRU queue is searched for a
cm_scache_t object that is safe to recycle.  If none are the LRU
queue was immediately searched again without dropping the
cm_scacheLock or taking a pause.  As a result it is quite possible
that a thread about to release a cm_scache_t was blocked from
doing so.

This patchset factors some of the logic a bit differently to
improve readability and adds new log messages to help diagnose
the cause of a problem if no cm_scache_t ever becomes available.

Change-Id: Ica6ebee0ce0456e879ae7188d9c8cdc935a92e5b
Reviewed-on: http://gerrit.openafs.org/7352
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsd/cm_scache.c