From: Jeffrey Altman Date: Sat, 2 Oct 2010 04:49:38 +0000 (-0400) Subject: Windows: Pass Volume Root Fid to cm_Analyze after RXAFS_GetVolumeStatus X-Git-Tag: openafs-devel-1_5_78~96 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0991d6bed5b6656607bb57cdd419771ea94686f5;p=packages%2Fo%2Fopenafs.git Windows: Pass Volume Root Fid to cm_Analyze after RXAFS_GetVolumeStatus RXAFS_GetVolumeStatus can return VNOVOL, VMOVED, etc. In order to process them and update volume state a fid must be passed to cm_Analyze(). Use the volume root fid. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/2883 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 59e6ac8a5c354b746a4b984f4a10af91ebeef5f3) Change-Id: I20a902e9e3074334764954faf297200e5dc60b80 Reviewed-on: http://gerrit.openafs.org/3133 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/WINNT/afsd/cm_volume.c b/src/WINNT/afsd/cm_volume.c index ffdfa43fa..266b50755 100644 --- a/src/WINNT/afsd/cm_volume.c +++ b/src/WINNT/afsd/cm_volume.c @@ -1145,7 +1145,6 @@ long cm_GetROVolumeID(cm_volume_t *volp) void cm_RefreshVolumes(int lifetime) { cm_volume_t *volp; - cm_scache_t *scp; afs_int32 refCount; time_t now; @@ -1195,12 +1194,16 @@ cm_CheckOfflineVolumeState(cm_volume_t *volp, cm_vol_state_t *statep, afs_uint32 char motd[256]; long alldown, alldeleted; cm_serverRef_t *serversp; + cm_fid_t fid; Name = volName; OfflineMsg = offLineMsg; MOTD = motd; if (statep->ID != 0 && (!volID || volID == statep->ID)) { + /* create fid for volume root so that VNOVOL and VMOVED errors can be processed */ + cm_SetFid(&fid, volp->cellp->cellID, statep->ID, 1, 1); + if (!statep->serversp && !(*volumeUpdatedp)) { cm_InitReq(&req); code = cm_UpdateVolumeLocation(volp->cellp, cm_rootUserp, &req, volp); @@ -1242,8 +1245,7 @@ cm_CheckOfflineVolumeState(cm_volume_t *volp, cm_vol_state_t *statep, afs_uint32 code = RXAFS_GetVolumeStatus(rxconnp, statep->ID, &volStat, &Name, &OfflineMsg, &MOTD); rx_PutConnection(rxconnp); - - } while (cm_Analyze(connp, cm_rootUserp, &req, NULL, NULL, NULL, NULL, code)); + } while (cm_Analyze(connp, cm_rootUserp, &req, &fid, NULL, NULL, NULL, code)); code = cm_MapRPCError(code, &req); lock_ObtainWrite(&volp->rw);