diff --git a/src/WINNT/afsrdr/kernel/lib/AFSRead.cpp b/src/WINNT/afsrdr/kernel/lib/AFSRead.cpp index 6810d4da96..660e90fccb 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSRead.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSRead.cpp @@ -1198,7 +1198,10 @@ AFSCommonRead( IN PDEVICE_OBJECT DeviceObject, pFcb); CcSetReadAheadGranularity( pFileObject, - READ_AHEAD_GRANULARITY); + pDeviceExt->Specific.RDR.MaximumRPCLength); + + CcSetDirtyPageThreshold( pFileObject, + AFS_DIRTY_CHUNK_THRESHOLD * pDeviceExt->Specific.RDR.MaximumRPCLength); } __except( EXCEPTION_EXECUTE_HANDLER) { diff --git a/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp b/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp index a9b5225fd1..e4db03a869 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp @@ -359,8 +359,10 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject, pFcb); CcSetReadAheadGranularity( pFileObject, - READ_AHEAD_GRANULARITY); + pDeviceExt->Specific.RDR.MaximumRPCLength); + CcSetDirtyPageThreshold( pFileObject, + AFS_DIRTY_CHUNK_THRESHOLD * pDeviceExt->Specific.RDR.MaximumRPCLength); } __except( EXCEPTION_EXECUTE_HANDLER) { diff --git a/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h b/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h index fc5dc2cbad..f600fdb082 100644 --- a/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h +++ b/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h @@ -206,12 +206,6 @@ NTSTATUS // #define AFS_SERVER_PURGE_SLEEP 6 -// -// Read ahead granularity -// - -#define READ_AHEAD_GRANULARITY 0x10000 // 64KB - #define AFS_DIR_ENUM_BUFFER_LEN (16 * 1024) // @@ -351,6 +345,8 @@ NTSTATUS #define AFS_MAXIMUM_EXTENT_RELEASE_COUNT 100 +#define AFS_DIRTY_CHUNK_THRESHOLD 2 + // {41966169-3FD7-4392-AFE4-E6A9D0A92C72} - generated using guidgen.exe DEFINE_GUID (GUID_SD_AFS_REDIRECTOR_CONTROL_OBJECT, 0x41966169, 0x3fd7, 0x4392, 0xaf, 0xe4, 0xe6, 0xa9, 0xd0, 0xa9, 0x2c, 0x72);