https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f8b5d27807db025dba05a922a73432940e2af66e

commit f8b5d27807db025dba05a922a73432940e2af66e
Author:     Pierre Schweitzer <pie...@reactos.org>
AuthorDate: Thu Feb 8 14:02:42 2018 +0100
Commit:     Pierre Schweitzer <pie...@reactos.org>
CommitDate: Thu Feb 8 14:02:42 2018 +0100

    [NDK] Update the PRIVATE_CACHE_MAP structure to match W2K3 one.
    Also update the spin lock on allocation.
---
 ntoskrnl/cc/view.c        | 1 +
 sdk/include/ndk/cctypes.h | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index 94fcff6b7a..18eaac50e8 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -1280,6 +1280,7 @@ CcRosInitializeFileCache (
         PrivateMap->NodeTypeCode = NODE_TYPE_PRIVATE_MAP;
         PrivateMap->ReadAheadMask = PAGE_SIZE - 1;
         PrivateMap->FileObject = FileObject;
+        KeInitializeSpinLock(&PrivateMap->ReadAheadSpinLock);
 
         /* Link it to the file */
         KeAcquireSpinLock(&SharedCacheMap->CacheMapLock, &OldIrql);
diff --git a/sdk/include/ndk/cctypes.h b/sdk/include/ndk/cctypes.h
index 5dd55689f5..c49a748923 100644
--- a/sdk/include/ndk/cctypes.h
+++ b/sdk/include/ndk/cctypes.h
@@ -75,10 +75,13 @@ typedef struct _PRIVATE_CACHE_MAP
     LARGE_INTEGER BeyondLastByte1;
     LARGE_INTEGER FileOffset2;
     LARGE_INTEGER BeyondLastByte2;
-    LARGE_INTEGER ReadAheadOffset[2];
-    ULONG ReadAheadLength[2];
+    ULONG SequentialReadCount;
+    ULONG ReadAheadLength;
+    LARGE_INTEGER ReadAheadOffset;
+    LARGE_INTEGER ReadAheadBeyondLastByte;
     KSPIN_LOCK ReadAheadSpinLock;
     LIST_ENTRY PrivateLinks;
+    PVOID ReadAheadWorkItem;
 } PRIVATE_CACHE_MAP, *PPRIVATE_CACHE_MAP;
 
 typedef struct _BITMAP_RANGE

Reply via email to