Windows: disable memory extent interface
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 14 Jan 2012 15:44:56 +0000 (10:44 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 18 Jan 2012 15:36:36 +0000 (07:36 -0800)
There have been reports that the memory extent interface which
is used when NonPersistentCache is active can lead to data corruption.

Change-Id: I3a8acae0648a67534e46c73ef1dcbf7f939a558d
Reviewed-on: http://gerrit.openafs.org/6557
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/WINNT/afsrdr/user/RDRFunction.c

index 7d3d9e8..2b482ed 100644 (file)
@@ -118,6 +118,11 @@ RDR_SetInitParams( OUT AFSRedirectorInitInfo **ppRedirInitInfo, OUT DWORD * pRed
     MEMORYSTATUSEX memStatus;
     DWORD maxMemoryCacheSize;
 
+#if 0
+    /*
+     * For now disable the memory extent interface because there
+     * have been reports of data corruption.
+     */
     memStatus.dwLength = sizeof(memStatus);
     if (GlobalMemoryStatusEx(&memStatus)) {
         /*
@@ -136,6 +141,9 @@ RDR_SetInitParams( OUT AFSRedirectorInitInfo **ppRedirInitInfo, OUT DWORD * pRed
          */
         maxMemoryCacheSize = 65536;
     }
+#else
+    maxMemoryCacheSize = 0;
+#endif
 
     *pRedirInitInfoLen = (DWORD) (sizeof(AFSRedirectorInitInfo) + (cm_CachePathLen + TempPathLen) * sizeof(WCHAR));
     *ppRedirInitInfo = (AFSRedirectorInitInfo *)malloc(*pRedirInitInfoLen);