From 6c49c21f9734d01ba6bf00f3a8e41460ff377868 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 18 Apr 2010 18:34:18 +0100 Subject: [PATCH] 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 --- src/WINNT/afsd/cm_volume.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/WINNT/afsd/cm_volume.c b/src/WINNT/afsd/cm_volume.c index 053f379..9976fe5 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 ) { -- 1.9.4