From: Jeffrey Altman Date: Mon, 29 Jun 2009 04:27:41 +0000 (+0000) Subject: windows-shutdown-20090628 X-Git-Tag: openafs-devel-1_5_61~197 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=307e077b2343b73731d7f21f422b7a130caf12c7;p=packages%2Fo%2Fopenafs.git windows-shutdown-20090628 LICENSE MIT short circuit on-going offline volume checks once a shutdown has begun. --- diff --git a/src/WINNT/afsd/cm_daemon.c b/src/WINNT/afsd/cm_daemon.c index e511561a9..63e5c8936 100644 --- a/src/WINNT/afsd/cm_daemon.c +++ b/src/WINNT/afsd/cm_daemon.c @@ -45,7 +45,7 @@ int cm_bkgWaitingForCount; /* true if someone's waiting for cm_bkgQueueCount to cm_bkgRequest_t *cm_bkgListp; /* first elt in the list of requests */ cm_bkgRequest_t *cm_bkgListEndp; /* last elt in the list of requests */ -static int daemon_ShutdownFlag = 0; +int daemon_ShutdownFlag = 0; static int cm_nDaemons = 0; static time_t lastIPAddrChange = 0; diff --git a/src/WINNT/afsd/cm_volume.c b/src/WINNT/afsd/cm_volume.c index cc6b8020f..17b6cd12e 100644 --- a/src/WINNT/afsd/cm_volume.c +++ b/src/WINNT/afsd/cm_volume.c @@ -1297,9 +1297,10 @@ void cm_CheckOfflineVolumes(void) { cm_volume_t *volp; afs_int32 refCount; + extern int daemon_ShutdownFlag; lock_ObtainRead(&cm_volumeLock); - for (volp = cm_data.allVolumesp; volp; volp=volp->allNextp) { + for (volp = cm_data.allVolumesp; volp && !daemon_ShutdownFlag; volp=volp->allNextp) { if (volp->flags & CM_VOLUMEFLAG_IN_HASH) { InterlockedIncrement(&volp->refCount); lock_ReleaseRead(&cm_volumeLock);