Windows: add DV and error status to dir enumerations
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 30 Dec 2011 03:20:38 +0000 (22:20 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 31 Dec 2011 21:19:45 +0000 (13:19 -0800)
commitad3c00520b93174808f692ced3e35261030a8c1b
treee22d3f0e6eeb8511cb30dfd2c35ebfdcf8247912
parent9b42af9326dbf34a7a657a7d4a2ea6d845c845e1
Windows: add DV and error status to dir enumerations

The cm_BPlusDirEnum family of functions are atomic when generating
the directory enumeration but are not atomic with respect to the
rest of the system as the enumeration is accessed.  Therefore, the
data version of the directory at the time the enumeration is created
may not be the same as the directory version when the enumeration
is fully processed.  We therefore store the initial data version in the
cm_direnum_t object.

When the enumeration is fetching status information for each of the
directory entries, it is possible that the fetch status will fail.
We therefore store the fetch status error code in the cm_direnum_entry_t
object.   By doing so, the consumer of the enumeration can make a
reasonable decision about the lack of status info.  For example,
if the resulting error is CM_ERROR_BADFD it is known that the entry
has been removed from the directory since the initial enumeration.

Change-Id: I289881e2c59525a9f998559b00769d3ac3f335c0
Reviewed-on: http://gerrit.openafs.org/6452
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_btree.c
src/WINNT/afsd/cm_btree.h