From: Jeffrey Altman Date: Sun, 18 Apr 2010 17:34:18 +0000 (+0100) Subject: Windows: Preserve volume location info in case of comm fail X-Git-Tag: openafs-devel-1_5_74~3 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6c49c21f9734d01ba6bf00f3a8e41460ff377868;p=packages%2Fo%2Fopenafs.git Windows: Preserve volume location info in case of comm fail The cache manager refreshes volume location information every two hours. If during a refresh the communication with the vldb server fails, the previously known volume location information should continue to be used. The previous behavior in which the volume location information is discarded first and then the update is performed can result in unnecessary client failures when a temporary disruption in communication with the vldb server occurs. Instead, wait until we have a successful response from the vldb server before the previous server list is discarded. LICENSE MIT Change-Id: I7c63c4f673a7a1360a74611c356329f31f9ceec3 Reviewed-on: http://gerrit.openafs.org/1769 Reviewed-by: Asanka Herath Tested-by: Asanka Herath Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_volume.c b/src/WINNT/afsd/cm_volume.c index 053f3794c..9976fe53b 100644 --- a/src/WINNT/afsd/cm_volume.c +++ b/src/WINNT/afsd/cm_volume.c @@ -217,12 +217,6 @@ long cm_UpdateVolumeLocation(struct cm_cell *cellp, cm_user_t *userp, cm_req_t * } } - /* clear out old bindings */ - for ( volType = RWVOL; volType < NUM_VOL_TYPES; volType++) { - if (volp->vol[volType].serversp) - cm_FreeServerList(&volp->vol[volType].serversp, CM_FREESERVERLIST_DELETE); - } - volp->flags |= CM_VOLUMEFLAG_UPDATING_VL; lock_ReleaseWrite(&volp->rw); @@ -338,6 +332,12 @@ long cm_UpdateVolumeLocation(struct cm_cell *cellp, cm_user_t *userp, cm_req_t * rwServers_alldown = 0; #endif + /* clear out old bindings */ + for ( volType = RWVOL; volType < NUM_VOL_TYPES; volType++) { + if (volp->vol[volType].serversp) + cm_FreeServerList(&volp->vol[volType].serversp, CM_FREESERVERLIST_DELETE); + } + memset(serverUUID, 0, sizeof(serverUUID)); switch ( method ) {