diff --git a/src/WINNT/afsd/afsd.h b/src/WINNT/afsd/afsd.h index 5705a04162..cd48d19647 100644 --- a/src/WINNT/afsd/afsd.h +++ b/src/WINNT/afsd/afsd.h @@ -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; diff --git a/src/WINNT/afsd/afsd_init.c b/src/WINNT/afsd/afsd_init.c index 3de99f441f..244ed448f4 100644 --- a/src/WINNT/afsd/afsd_init.c +++ b/src/WINNT/afsd/afsd_init.c @@ -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; diff --git a/src/WINNT/afsrdr/common/AFSUserStructs.h b/src/WINNT/afsrdr/common/AFSUserStructs.h index aa7586d359..2a5f9ceed1 100644 --- a/src/WINNT/afsrdr/common/AFSUserStructs.h +++ b/src/WINNT/afsrdr/common/AFSUserStructs.h @@ -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 diff --git a/src/WINNT/afsrdr/kernel/fs/AFSRDRSupport.cpp b/src/WINNT/afsrdr/kernel/fs/AFSRDRSupport.cpp index 295a60bcc9..af91123025 100644 --- a/src/WINNT/afsrdr/kernel/fs/AFSRDRSupport.cpp +++ b/src/WINNT/afsrdr/kernel/fs/AFSRDRSupport.cpp @@ -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? // diff --git a/src/WINNT/afsrdr/user/RDRFunction.c b/src/WINNT/afsrdr/user/RDRFunction.c index 7b10f8b5ac..982faa674e 100644 --- a/src/WINNT/afsrdr/user/RDRFunction.c +++ b/src/WINNT/afsrdr/user/RDRFunction.c @@ -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;