Windows: Freelance Discovery configuration
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 8 Aug 2012 20:42:47 +0000 (16:42 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 10 Aug 2012 22:43:32 +0000 (15:43 -0700)
Add new "FreelanceDiscovery" configuration option to permit
Freelance dynroot mode to be used without the automatic discovery
of cells and generation of mount points.

Change-Id: I5520c3b3e2388b984c7120212d4f0167dc2f2bc3
Reviewed-on: http://gerrit.openafs.org/7950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

doc/xml/ReleaseNotesWindows/relnotes.xml
src/WINNT/afsd/afsd_init.c
src/WINNT/afsd/cm_freelance.c
src/WINNT/afsd/cm_freelance.h
src/WINNT/afsd/cm_vnodeops.c

index e409260..b62c8e6 100644 (file)
@@ -3641,6 +3641,42 @@ Variable: cm_freelanceEnabled</para>
           <para>Enables freelance client.</para>
         </section>
         <section>
+          <title id="Regkey_TransarcAFSDaemon_Parameters_FreelanceImportCellServDB">Value: FreelanceImportCellServDB</title>
+          <indexterm significance="normal">
+            <primary>FreelanceImportCellServDB</primary>
+          </indexterm>
+          <indexterm significance="normal">
+            <primary>dynroot</primary>
+          </indexterm>
+          <para id="Value_FreelanceImportCellServDB">Regkey: [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</para>
+          <para>Type: DWORD {1,0}
+          </para>
+          <para>
+            Default: 0
+          </para>
+          <para>
+            Variable: cm_freelanceImportCellServDB</para>
+          <para>Creates Freelance Mount Points for each cell listed in the CellServDB during startup.</para>
+        </section>
+        <section>
+          <title id="Regkey_TransarcAFSDaemon_Parameters_FreelanceDiscovery">Value: FreelanceDiscovery</title>
+          <indexterm significance="normal">
+            <primary>FreelanceDiscovery</primary>
+          </indexterm>
+          <indexterm significance="normal">
+            <primary>dynroot</primary>
+          </indexterm>
+          <para id="Value_FreelanceDiscovery">Regkey: [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</para>
+          <para>Type: DWORD {1,0}
+          </para>
+          <para>
+            Default: 1
+          </para>
+          <para>
+            Variable: cm_freelanceDiscovery</para>
+          <para>Enables automatic discovery of cell mount points within the Freelance root.</para>
+        </section>
+        <section>
           <title id="Regkey_TransarcAFSDaemon_Parameters_HideDotFiles">Value: HideDotFiles</title>
           <indexterm significance="normal">
             <primary>HideDotFiles</primary>
index 44763cf..714ac2a 100644 (file)
@@ -1073,6 +1073,13 @@ afsd_InitCM(char **reasonP)
                             (BYTE *) &cm_freelanceImportCellServDB, &dummyLen);
     afsi_log("Freelance client %s import CellServDB",
               cm_freelanceImportCellServDB ? "does" : "does not");
+
+    dummyLen = sizeof(cm_freelanceDiscovery);
+    code = RegQueryValueEx(parmKey, "FreelanceDiscovery", NULL, NULL,
+                            (BYTE *) &cm_freelanceDiscovery, &dummyLen);
+    afsi_log("Freelance client discovery is %s",
+              cm_freelanceDiscovery ? "on" : "off");
+
 #endif /* AFS_FREELANCE_CLIENT */
 
     dummyLen = sizeof(smb_UseUnicode);
index 2a59014..b55d942 100644 (file)
@@ -31,6 +31,7 @@ static cm_localMountPoint_t* cm_localMountPoints;
 osi_mutex_t cm_Freelance_Lock;
 static int cm_localMountPointChangeFlag = 0;
 int cm_freelanceEnabled = 1;
+int cm_freelanceDiscovery = 1;
 int cm_freelanceImportCellServDB = 0;
 time_t FakeFreelanceModTime = 0x3b49f6e2;
 
index 6b92f4c..3947571 100644 (file)
@@ -35,4 +35,5 @@ extern int cm_FakeRootFid(cm_fid_t *fidp);
 extern time_t FakeFreelanceModTime;
 extern int cm_freelanceEnabled;
 extern int cm_freelanceImportCellServDB;
+extern int cm_freelanceDiscovery;
 #endif // _CM_FREELANCE_H
index 2432edb..6a94dfd 100644 (file)
@@ -1151,7 +1151,7 @@ retry_lookup:
 notfound:
     getroot = (dscp==cm_data.rootSCachep) ;
     if (!rock.found) {
-        if (!cm_freelanceEnabled || !getroot) {
+        if (!(cm_freelanceEnabled && cm_freelanceDiscovery) || !getroot) {
             if (flags & CM_FLAG_CHECKPATH)
                 code = CM_ERROR_NOSUCHPATH;
             else