windows-cm_ioctl_query_opts-20080115
[openafs.git] / src / WINNT / afsd / afsd_init.c
index 64364ca..735bc3d 100644 (file)
@@ -42,11 +42,13 @@ extern int RXSTATS_ExecuteRequest(struct rx_call *z_call);
 
 extern afs_int32 cryptall;
 extern int cm_enableServerLocks;
+extern int cm_followBackupPath;
 extern int cm_deleteReadOnly;
 #ifdef USE_BPLUS
 extern afs_int32 cm_BPlusTrees;
 #endif
 extern afs_int32 cm_OfflineROIsValid;
+extern afs_int32 cm_giveUpAllCBs;
 extern const char **smb_ExecutableExtensions;
 
 osi_log_t *afsd_logp;
@@ -462,7 +464,7 @@ static void afsd_InitServerPreferences(void)
             }
             else       /* add a new server without a cell */
             {
-                tsp = cm_NewServer(&saddr, CM_SERVER_VLDB, NULL); /* refcount = 1 */
+                tsp = cm_NewServer(&saddr, CM_SERVER_VLDB, NULL, CM_FLAG_NOPROBE); /* refcount = 1 */
                 tsp->ipRank = (USHORT)dwRank;
             }
         }
@@ -532,7 +534,7 @@ static void afsd_InitServerPreferences(void)
             }
             else       /* add a new server without a cell */
             {
-                tsp = cm_NewServer(&saddr, CM_SERVER_FILE, NULL); /* refcount = 1 */
+                tsp = cm_NewServer(&saddr, CM_SERVER_FILE, NULL, CM_FLAG_NOPROBE); /* refcount = 1 */
                 tsp->ipRank = (USHORT)dwRank;
             }
         }
@@ -748,9 +750,11 @@ int afsd_InitCM(char **reasonP)
     dummyLen = sizeof(numBkgD);
     code = RegQueryValueEx(parmKey, "Daemons", NULL, NULL,
                             (BYTE *) &numBkgD, &dummyLen);
-    if (code == ERROR_SUCCESS)
+    if (code == ERROR_SUCCESS) {
+        if (numBkgD > CM_MAX_DAEMONS)
+            numBkgD = CM_MAX_DAEMONS;
         afsi_log("%d background daemons", numBkgD);
-    else {
+    } else {
         numBkgD = CM_CONFIGDEFAULT_DAEMONS;
         afsi_log("Defaulting to %d background daemons", numBkgD);
     }
@@ -1129,6 +1133,22 @@ int afsd_InitCM(char **reasonP)
     } 
     afsi_log("CM OfflineReadOnlyIsValid is %u", cm_deleteReadOnly);
     
+    dummyLen = sizeof(DWORD);
+    code = RegQueryValueEx(parmKey, "GiveUpAllCallBacks", NULL, NULL,
+                           (BYTE *) &dwValue, &dummyLen);
+    if (code == ERROR_SUCCESS) {
+        cm_giveUpAllCBs = (unsigned short) dwValue;
+    } 
+    afsi_log("CM GiveUpAllCallBacks is %u", cm_giveUpAllCBs);
+
+    dummyLen = sizeof(DWORD);
+    code = RegQueryValueEx(parmKey, "FollowBackupPath", NULL, NULL,
+                           (BYTE *) &dwValue, &dummyLen);
+    if (code == ERROR_SUCCESS) {
+        cm_followBackupPath = (unsigned short) dwValue;
+    } 
+    afsi_log("CM FollowBackupPath is %u", cm_followBackupPath);
+
     RegCloseKey (parmKey);
 
     cacheBlocks = ((afs_uint64)cacheSize * 1024) / blockSize;