[NTOSKRNL:CC] Bug Fix
Some test failed due to miss use of ForwardClusterOnly
This commit is contained in:
parent
2530ffd322
commit
688615fa39
@ -90,7 +90,7 @@ CcMapDataForOverwrite(
|
||||
|
||||
}
|
||||
|
||||
savedState = currentThread->CacheManagerActive + 2 * currentThread->ReadClusterSize;
|
||||
savedState = currentThread->ForwardClusterOnly + 2 * currentThread->ReadClusterSize;
|
||||
readClusterSize = currentThread->ReadClusterSize;
|
||||
|
||||
CcMapDataCommon(FileObject, FileOffset, Length, TRUE, &outBcb, &localBuffer);
|
||||
@ -101,7 +101,7 @@ CcMapDataForOverwrite(
|
||||
|
||||
while (remainingPages)
|
||||
{
|
||||
currentThread->CacheManagerActive = 1;
|
||||
currentThread->ForwardClusterOnly = 1;
|
||||
if (--remainingPages > readClusterSize)
|
||||
{
|
||||
currentThread->ReadClusterSize = (remainingPages > 0xF) ? 15 : remainingPages;
|
||||
@ -114,8 +114,8 @@ CcMapDataForOverwrite(
|
||||
|
||||
SystemCacheAddress += 4096;
|
||||
}
|
||||
|
||||
currentThread->CacheManagerActive = savedState & 1;
|
||||
/* Restore to the saved state*/
|
||||
currentThread->ForwardClusterOnly = savedState & 1;
|
||||
currentThread->ReadClusterSize = savedState >> 1;
|
||||
*Bcb = outBcb;
|
||||
*Buffer = localBuffer;
|
||||
|
Loading…
Reference in New Issue
Block a user