]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: permit offline volume check to be disabled
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 4 Sep 2011 18:58:23 +0000 (14:58 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 15 Nov 2011 13:50:53 +0000 (05:50 -0800)
Setting the registry value to 0 can now be used as a
method of disabling the offline volume check.

Reviewed-on: http://gerrit.openafs.org/5370
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 19a5b5e67c65f0a9109b0fb5410b5ba74ad85b41)

Change-Id: I50dfa3c5387ba8a1cbdd3ca80f9e8dc03e92c404
Reviewed-on: http://gerrit.openafs.org/6036
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsd/cm_daemon.c

index 12ac24f640c518bf8fcc2ef8b4ab31a3c0a14b60..80b8fc3120c466d753b0044eb4a7ba863ee74b58 100644 (file)
@@ -427,7 +427,8 @@ void cm_Daemon(long parm)
     lastDownServerCheck = now - cm_daemonCheckDownInterval/2 + (rand() % cm_daemonCheckDownInterval);
     lastUpServerCheck = now - cm_daemonCheckUpInterval/2 + (rand() % cm_daemonCheckUpInterval);
     lastTokenCacheCheck = now - cm_daemonTokenCheckInterval/2 + (rand() % cm_daemonTokenCheckInterval);
-    lastBusyVolCheck = now - cm_daemonCheckOfflineVolInterval/2 * (rand() % cm_daemonCheckOfflineVolInterval);
+    if (cm_daemonCheckOfflineVolInterval)
+        lastBusyVolCheck = now - cm_daemonCheckOfflineVolInterval/2 * (rand() % cm_daemonCheckOfflineVolInterval);
     if (cm_daemonPerformanceTuningInterval)
         lastPerformanceCheck = now - cm_daemonPerformanceTuningInterval/2 * (rand() % cm_daemonPerformanceTuningInterval);
     lastServerRankCheck = now - cm_daemonRankServerInterval/2 * (rand() % cm_daemonRankServerInterval);
@@ -551,7 +552,8 @@ void cm_Daemon(long parm)
             now = osi_Time();
         }
 
-        if ((bAddrChangeCheck || now > lastBusyVolCheck + cm_daemonCheckOfflineVolInterval) &&
+        if ((bAddrChangeCheck || (cm_daemonCheckOfflineVolInterval &&
+                                  now > lastBusyVolCheck + cm_daemonCheckOfflineVolInterval)) &&
             daemon_ShutdownFlag == 0 &&
             powerStateSuspended == 0) {
             lastBusyVolCheck = now;