CM_GETVOL_FLAG_NO_LRU_UPDATE,
&volp);
if (code == 0) {
- if (timeLeft > 7) {
+ /*
+ * Do not perform a cm_CheckOfflineVolume() if cm_Analyze()
+ * was called by cm_CheckOfflineVolumeState().
+ */
+ if (!(reqp->flags & CM_REQ_OFFLINE_VOL_CHK) && timeLeft > 7) {
thrd_Sleep(5000);
/* cm_CheckOfflineVolume() resets the serverRef state */
} cm_req_t;
/* flags in cm_req structure */
-#define CM_REQ_NORETRY 0x1
-#define CM_REQ_NEW_CONN_FORCED 0x2
-#define CM_REQ_SOURCE_SMB 0x4
-#define CM_REQ_VOLUME_UPDATED 0x8
+#define CM_REQ_NORETRY 0x01
+#define CM_REQ_NEW_CONN_FORCED 0x02
+#define CM_REQ_SOURCE_SMB 0x04
+#define CM_REQ_VOLUME_UPDATED 0x08
+/* 0x10 and 0x20 are reserved for the afs redirector */
+#define CM_REQ_OFFLINE_VOL_CHK 0x40
/*
* Vice2 error codes
if (statep->state == vl_busy || statep->state == vl_offline || statep->state == vl_unknown ||
(!alldown && statep->state == vl_alldown)) {
cm_InitReq(&req);
+ req.flags |= CM_REQ_OFFLINE_VOL_CHK;
lock_ReleaseWrite(&volp->rw);
do {
code = cm_ConnFromVolume(volp, statep->ID, cm_rootUserp, &req, &connp);
- if (code)
+ if (code)
continue;
rxconnp = cm_GetRxConn(connp);
code = RXAFS_GetVolumeStatus(rxconnp, statep->ID,
&volStat, &Name, &OfflineMsg, &MOTD);
- rx_PutConnection(rxconnp);
+ rx_PutConnection(rxconnp);
} while (cm_Analyze(connp, cm_rootUserp, &req, &fid, NULL, NULL, NULL, code));
code = cm_MapRPCError(code, &req);