Windows: AFSDirEnumResp and AFSDirEnumEntry changes
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 30 Dec 2011 06:34:51 +0000 (01:34 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 31 Dec 2011 21:44:03 +0000 (13:44 -0800)
commitd64983bab047ad6349d2edfe2ffa35b484529889
tree46358efb779526fa7a3af60a9c7b0e869913a481
parentf142b615bbac6195aa4e275179f37da490013432
Windows: AFSDirEnumResp and AFSDirEnumEntry changes

A directory enumeration is not an atomic operation.  The redirector
reads an enumeration a chunk at a time.  During the entire enumeration
it is possible that the data version of the directory object has
changed due to entries being added or removed.  This patchset adds
two data version values to the AFSDirEnumResp structure.

The first is the snapshot data version which is the dv of the
directory object at the time the entry list snapshot was taken.
The second is the current data version number of the directory
object.

If an object has been removed from the directory after the snapshot
was taken, attempts to fetch status information for the object will
fail with a VNOVNODE (aka CM_ERROR_BADFD aka STATUS_INVALID_HANDLE).
The NTStatus field has been added to the AFSDirEnumEntry structure
to permit notifying the redirector of such failures.

RDR_PopulateCurrentEntry() has been extended with an additional
cm_Error parameter that accepts the errorCode field provided by
the cm_direnum_entry_t object constructed during the enumeration.

Change-Id: Iee8f6bf9919780ce4dd6c2b184810c0d6afc39cc
Reviewed-on: http://gerrit.openafs.org/6455
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsrdr/common/AFSUserStructs.h
src/WINNT/afsrdr/user/RDRFunction.c