From 093433b981cd1917215a4ee6196c5a0a55352d92 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 15 Feb 2008 03:23:44 +0000 Subject: [PATCH] windows-volstat-vl-unknown-20080214 LICENSE MIT Add volumes in the vl_unknown state to the list of objects to be checked as offline or retried when an allbusy error is received in cm_Analyze. --- src/WINNT/afsd/cm_conn.c | 6 ++++-- src/WINNT/afsd/cm_scache.c | 4 ++-- src/WINNT/afsd/cm_volume.c | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/WINNT/afsd/cm_conn.c b/src/WINNT/afsd/cm_conn.c index cc18ad2c62..91146f5832 100644 --- a/src/WINNT/afsd/cm_conn.c +++ b/src/WINNT/afsd/cm_conn.c @@ -280,7 +280,7 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp, else if (fidp->volume == volp->bk.ID) statep = &volp->bk; - if (statep->state != vl_offline) { + if (statep->state != vl_offline && statep->state != vl_unknown) { retry = 1; } else { if (cm_CheckOfflineVolume(volp, statep->ID)) @@ -312,7 +312,9 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp, else if (fidp->volume == volp->bk.ID) statep = &volp->bk; - if (statep->state != vl_offline && statep->state != vl_busy) { + if (statep->state != vl_offline && + statep->state != vl_busy && + statep->state != vl_unknown) { retry = 1; } else { if (!serversp) { diff --git a/src/WINNT/afsd/cm_scache.c b/src/WINNT/afsd/cm_scache.c index 8a982f368b..bd3b9025a5 100644 --- a/src/WINNT/afsd/cm_scache.c +++ b/src/WINNT/afsd/cm_scache.c @@ -638,8 +638,8 @@ long cm_GetSCache(cm_fid_t *fidp, cm_scache_t **outScpp, cm_user_t *userp, long code; cm_volume_t *volp = NULL; cm_cell_t *cellp; - int special; // yj: boolean variable to test if file is on root.afs - int isRoot; + int special = 0; // yj: boolean variable to test if file is on root.afs + int isRoot = 0; extern cm_fid_t cm_rootFid; hash = CM_SCACHE_HASH(fidp); diff --git a/src/WINNT/afsd/cm_volume.c b/src/WINNT/afsd/cm_volume.c index 64fb8ab12f..615b5a40f2 100644 --- a/src/WINNT/afsd/cm_volume.c +++ b/src/WINNT/afsd/cm_volume.c @@ -1010,7 +1010,7 @@ cm_CheckOfflineVolume(cm_volume_t *volp, afs_uint32 volID) lock_ObtainMutex(&volp->mx); if (volp->rw.ID != 0 && (!volID || volID == volp->rw.ID) && - (volp->rw.state == vl_busy || volp->rw.state == vl_offline)) { + (volp->rw.state == vl_busy || volp->rw.state == vl_offline || volp->rw.state == vl_unknown)) { cm_InitReq(&req); for (serversp = volp->rw.serversp; serversp; serversp = serversp->next) { @@ -1045,7 +1045,7 @@ cm_CheckOfflineVolume(cm_volume_t *volp, afs_uint32 volID) } if (volp->ro.ID != 0 && (!volID || volID == volp->ro.ID) && - (volp->ro.state == vl_busy || volp->ro.state == vl_offline)) { + (volp->ro.state == vl_busy || volp->ro.state == vl_offline || volp->ro.state == vl_unknown)) { cm_InitReq(&req); for (serversp = volp->ro.serversp; serversp; serversp = serversp->next) { @@ -1080,7 +1080,7 @@ cm_CheckOfflineVolume(cm_volume_t *volp, afs_uint32 volID) } if (volp->bk.ID != 0 && (!volID || volID == volp->bk.ID) && - (volp->bk.state == vl_busy || volp->bk.state == vl_offline)) { + (volp->bk.state == vl_busy || volp->bk.state == vl_offline || volp->bk.state == vl_unknown)) { cm_InitReq(&req); for (serversp = volp->bk.serversp; serversp; serversp = serversp->next) {