Windows: Fail RX_INVALID_OPERATION errors
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 24 Nov 2012 19:36:46 +0000 (14:36 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 29 Nov 2012 23:48:42 +0000 (15:48 -0800)
commitded88c8f8d1dc6758344b708d2aa55f3b29651c7
tree7f351ce19d2bd5d419a14c424f3d2264512d26d1
parent988f66c5c3bd4c4f23bfa53e69a52ed52c4e3ab9
Windows: Fail RX_INVALID_OPERATION errors

RX_INVALID_OPERATION errors were not resulting in an eventual
failure and the RPC was being repeated indefinitely.  There were
three subtle problems:

 1. RX_INVALID_OPERATION was being processed by cm_Analyze()
    resulting in a retry in all cases.  Even those where no
    connp was passed in as NULL.  connp == NULL implies that
    no server could be obtained so the RPC was not issued on
    this pass.  As a result there should be no retry.

 2. RX_INVALID_OPERATION was mapped to CM_ERROR_UNKNOWN which
    is not an error that is reported to the AFS redirector.

 3. RDR_BkgFetch was setting CM_REQ_NORETRY and permitting
    the retries to be handled by the cm_daemon threads.  However,
    CM_ERROR_UNKNOWN was not treated as a fatal error by cm_Daemon.

Address the failures in the following ways:

 A. cm_Analyze no longer retries calls which did not take place.

 B. Create a new CM_ERROR_INVAL_NET_RESP error for RX_INVALID_OPERATION
    which is translated to the Win32 STATUS_INVALID_NETWORK_RESPONSE
    error.  This is now returned to the AFS redirector and treated
    as a fatal error.

 C. RDR_BkgFetch no longer queues tasks to cm_Daemon with the
    CM_REQ_NORETRY flag set.

Change-Id: I1eba0e83fbbe5726f43f667ddb67ced8c011853d
Reviewed-on: http://gerrit.openafs.org/8510
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_conn.c
src/WINNT/afsd/cm_dcache.c
src/WINNT/afsd/cm_error.h
src/WINNT/afsd/cm_utils.c
src/WINNT/afsd/smb.c
src/WINNT/afsrdr/user/RDRFunction.c