Windows: "ReparsePointPolicy" registry key
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 15 Apr 2013 01:08:20 +0000 (21:08 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 8 May 2013 00:39:46 +0000 (17:39 -0700)
HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters

  DWORD "ReparsePointPolicy"

Valid values are:

 0 - No global policy set
 1 - Reparse Points to Files treated as the target File

Change-Id: Ib8f4f6a4c5c3b2faaf86a6650a4ce3ebcbbdf0e0
Reviewed-on: http://gerrit.openafs.org/9789
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsd/afsd.h
src/WINNT/afsd/afsd_init.c
src/WINNT/afsrdr/common/AFSUserStructs.h
src/WINNT/afsrdr/kernel/fs/AFSRDRSupport.cpp
src/WINNT/afsrdr/user/RDRFunction.c

index 5705a04..cd48d19 100644 (file)
@@ -120,6 +120,8 @@ extern int cm_shortNames;
 extern int cm_directIO;
 extern int cm_volumeInfoReadOnlyFlag;
 
+extern afs_uint32 rdr_ReparsePointPolicy;
+
 extern long rx_mtu;
 
 extern HANDLE WaitToTerminate;
index 3de99f4..244ed44 100644 (file)
@@ -81,6 +81,8 @@ int cm_shortNames = 1;
 int cm_directIO = 1;
 int cm_volumeInfoReadOnlyFlag = 0;
 
+afs_uint32 rdr_ReparsePointPolicy = 0;
+
 int smb_UseV3 = 1;
 afs_uint32 smb_Enabled = 1;
 
@@ -1414,6 +1416,16 @@ afsd_InitCM(char **reasonP)
     }
     afsi_log("CM DirectIO is %u", cm_directIO);
 
+    dummyLen = sizeof(DWORD);
+    code = RegQueryValueEx(parmKey, "ReparsePointPolicy", NULL, NULL,
+                          (BYTE *) &dwValue, &dummyLen);
+    if (code == ERROR_SUCCESS) {
+       rdr_ReparsePointPolicy = (unsigned short) dwValue;
+    } else {
+       rdr_ReparsePointPolicy = 0;
+    }
+    afsi_log("RDR ReparsePointPolicy is 0x%x", rdr_ReparsePointPolicy);
+
     RegCloseKey (parmKey);
 
     cacheBlocks = ((afs_uint64)cacheSize * 1024) / blockSize;
index aa7586d..2a5f9ce 100644 (file)
@@ -134,6 +134,8 @@ typedef struct _AFS_REDIR_INIT_INFO_CB
                                         // dynamic and will be increased in size as
                                         // needed by this amount
 
+    ULONG       GlobalReparsePointPolicy; // One or more of AFS_REPARSE_POINT_VALID_POLICY_FLAGS
+
     LARGE_INTEGER MemoryCacheOffset;    // The offset in the afsd_service process memory
                                         // space at which the extents are allocated
     LARGE_INTEGER MemoryCacheLength;    // and the length of the allocated region
index 295a60b..af91123 100644 (file)
@@ -518,6 +518,12 @@ AFSInitializeRedirector( IN AFSRedirectorInitInfo *RedirInitInfo)
         }
 
         //
+       // Global Reparse Point Policy
+       //
+
+       pDevExt->Specific.RDR.ReparsePointPolicy = RedirInitInfo->GlobalReparsePointPolicy;
+
+       //
         // Are we performing direct to service IO?
         //
 
index 7b10f8b..982faa6 100644 (file)
@@ -214,6 +214,7 @@ RDR_SetInitParams( OUT AFSRedirectorInitInfo **ppRedirInitInfo, OUT DWORD * pRed
     (*ppRedirInitInfo)->CacheBlockSize = cm_data.blockSize;
     (*ppRedirInitInfo)->MaxPathLinkCount = MAX_FID_COUNT;
     (*ppRedirInitInfo)->NameArrayLength = MAX_FID_COUNT;
+    (*ppRedirInitInfo)->GlobalReparsePointPolicy = rdr_ReparsePointPolicy;
     if (cm_virtualCache || cm_data.bufferSize <= maxMemoryCacheSize) {
         osi_Log0(afsd_logp, "RDR_SetInitParams Initializing Memory Extent Interface");
         (*ppRedirInitInfo)->MemoryCacheOffset.QuadPart = (LONGLONG)cm_data.bufDataBaseAddress;