Windows: AFSTearDownExtents may experience active extents
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 14 May 2012 15:11:57 +0000 (11:11 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 17 May 2012 01:20:43 +0000 (18:20 -0700)
commit94f96c6aae142478bf0824e7c3a3a810494a123d
tree9054f262fb054901bc10a3a508dbf9409723b444
parenta9a768fb7ac06c887c45f6ed144c312fe357ab1e
Windows: AFSTearDownExtents may experience active extents

If there are extents with a non-zero ActiveCount when AFSTearDownExtents()
is executed, it must leave them alone and attached to the File Control
Block.  This has implications for its callers, especially AFSCleanupFcb()
since it may be the case that a Cleanup cannot be completed.

The AFSPrimaryVolumeWorker thread must therefore check after calling
AFSCleanupFcb() whether or not the Fcb ExtentCount is zero before
calling AFSRemoveFcb().

Change-Id: I164dbe24d2bfe69aba0fcb5d845f66415d5bb0c3
Reviewed-on: http://gerrit.openafs.org/7406
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsrdr/kernel/lib/AFSClose.cpp
src/WINNT/afsrdr/kernel/lib/AFSExtentsSupport.cpp
src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp
src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp
src/WINNT/afsrdr/kernel/lib/Include/AFSCommon.h