*/
if (code == CM_ERROR_NOSUCHFILE || code == CM_ERROR_BADFD || code == CM_ERROR_NOACCESS ||
code == CM_ERROR_QUOTA || code == CM_ERROR_SPACE || code == CM_ERROR_TOOBIG ||
- code == CM_ERROR_READONLY || code == CM_ERROR_NOSUCHPATH || code == EIO){
+ code == CM_ERROR_READONLY || code == CM_ERROR_NOSUCHPATH || code == EIO ||
+ code == CM_ERROR_INVAL || code == CM_ERROR_INVAL_NET_RESP || code == CM_ERROR_UNKNOWN){
_InterlockedAnd(&bp->flags, ~CM_BUF_DIRTY);
_InterlockedOr(&bp->flags, CM_BUF_ERROR);
bp->dirty_length = 0;
if (reqp->flags & CM_REQ_NORETRY)
break;
- /* Ditto if the hardDeadTimeout or idleTimeout was reached */
+ /*
+ * Ditto if the hardDeadTimeout or idleTimeout was reached
+ * Or a fatal error is received.
+ */
if (code == CM_ERROR_TIMEDOUT || code == CM_ERROR_ALLDOWN ||
code == CM_ERROR_ALLBUSY || code == CM_ERROR_ALLOFFLINE ||
- code == CM_ERROR_CLOCKSKEW) {
+ code == CM_ERROR_CLOCKSKEW || code == CM_ERROR_INVAL_NET_RESP ||
+ code == CM_ERROR_INVAL || code == CM_ERROR_UNKNOWN || code == EIO) {
break;
}
}
switch (code) {
case CM_ERROR_NOSUCHFILE:
+ case CM_ERROR_INVAL:
case CM_ERROR_BADFD:
case CM_ERROR_NOACCESS:
case CM_ERROR_QUOTA:
case CM_ERROR_READONLY:
case CM_ERROR_NOSUCHPATH:
case EIO:
+ case CM_ERROR_INVAL_NET_RESP:
+ case CM_ERROR_UNKNOWN:
/*
* Apply the previous fatal error to this buffer.
* Do not waste the time attempting to store to
cm_volume_t * volp = NULL;
cm_vol_state_t *statep = NULL;
cm_scache_t * scp = NULL;
- afs_uint32 replicated;
+ afs_uint32 replicated = 0;
int retry = 0;
int free_svr_list = 0;
- int dead_session;
+ int dead_session = (userp->cellInfop == NULL);
long timeUsed, timeLeft;
- long code;
+ long code = 0;
char addr[16]="unknown";
int forcing_new = 0;
int location_updated = 0;
/* no locking required, since connp->serverp never changes after
* creation */
- dead_session = (userp->cellInfop == NULL);
if (connp)
serverp = connp->serverp;
forcing_new = 1;
cm_ForceNewConnections(serverp);
}
+
+ if ( timeLeft > 2 )
+ retry = 1;
}
- if ( timeLeft > 2 )
- retry = 1;
}
else if (errorCode == RXKADEXPIRED) {
osi_Log1(afsd_logp, "cm_Analyze: rxkad error code 0x%x (RXKADEXPIRED)",
}
/* If not allowed to retry, don't */
- if (!forcing_new && (reqp->flags & CM_REQ_NORETRY) &&
- (errorCode != RX_MSGSIZE && errorCode != RX_CALL_BUSY))
- retry = 0;
- else if (retry && dead_session)
+ if (dead_session ||
+ !forcing_new && (reqp->flags & CM_REQ_NORETRY) &&
+ !(errorCode > -64 && errorCode <= RX_INVALID_OPERATION))
retry = 0;
/* drop this on the way out */
case CM_ERROR_READONLY:
case CM_ERROR_NOSUCHPATH:
case EIO:
+ case CM_ERROR_INVAL_NET_RESP:
+ case CM_ERROR_UNKNOWN:
/*
* Apply the fatal error to this buffer.
*/
#define CM_ERROR_RPC_MOREDATA (CM_ERROR_BASE+63)
#define CM_ERROR_BUFFER_OVERFLOW (CM_ERROR_BASE+64)
#define CM_ERROR_EMPTY (CM_ERROR_BASE+65)
+#define CM_ERROR_INVAL_NET_RESP (CM_ERROR_BASE+66)
#endif /* OPENAFS_WINNT_AFSD_CM_ERROR_H */
error = CM_ERROR_RETRY;
else if (error == RX_CALL_IDLE)
error = EIO;
+ else if (error == RX_INVALID_OPERATION)
+ error = CM_ERROR_INVAL_NET_RESP;
else if (error < 0)
error = CM_ERROR_UNKNOWN;
else if (error == EINVAL)
error = CM_ERROR_ALLOFFLINE;
else if (error == VBUSY || error == VRESTARTING)
error = CM_ERROR_ALLBUSY;
+ else if (error == RX_INVALID_OPERATION)
+ error = CM_ERROR_INVAL_NET_RESP;
else if (error < 0)
error = CM_ERROR_UNKNOWN;
else if (error == EROFS)
error == RX_MSGSIZE ||
error == VNOSERVICE)
error = CM_ERROR_RETRY;
+ else if (error == RX_INVALID_OPERATION)
+ error = CM_ERROR_INVAL_NET_RESP;
else if (error == RX_RESTARTING)
error = CM_ERROR_ALLBUSY;
else if (error < 0)
else if (code == CM_ERROR_INVAL) {
NTStatus = 0xC000000DL; /* Invalid parameter */
}
+ else if (code == CM_ERROR_INVAL_NET_RESP) {
+ NTStatus = 0xC00000C3L; /* Invalid network response */
+ }
else if (code == CM_ERROR_BADFD) {
NTStatus = 0xC0000008L; /* Invalid handle */
}
case CM_ERROR_QUOTA:
case CM_ERROR_LOCK_CONFLICT:
case EIO:
+ case CM_ERROR_INVAL_NET_RESP:
+ case CM_ERROR_UNKNOWN:
/*
* these are fatal errors. deliver what we can
* and halt.
buf_Release(bufp);
if (QueueLength) {
+ req.flags &= ~CM_REQ_NORETRY;
cm_QueueBKGRequest(scp, RDR_BkgFetch, QueueOffset.LowPart, QueueOffset.HighPart,
QueueLength, 0, userp, &req);
osi_Log3(afsd_logp, "RDR_RequestFileExtentsAsync Queued a Background Fetch offset 0x%x:%x length 0x%x",
QueueOffset.HighPart, QueueOffset.LowPart, QueueLength);
+ req.flags |= CM_REQ_NORETRY;
}
} else {
/* No error from buf_Get() can be fatal */
if (BeginOffset.QuadPart != EndOffset.QuadPart) {
afs_uint32 length = (afs_uint32)(EndOffset.QuadPart - BeginOffset.QuadPart);
+ req.flags &= ~CM_REQ_NORETRY;
cm_QueueBKGRequest(scp, RDR_BkgFetch, BeginOffset.LowPart, BeginOffset.HighPart,
length, 0, userp, &req);
osi_Log3(afsd_logp, "RDR_RequestFileExtentsAsync Queued a Background Fetch offset 0x%x:%x length 0x%x",