[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;
|
readClusterSize = currentThread->ReadClusterSize;
|
||||||
|
|
||||||
CcMapDataCommon(FileObject, FileOffset, Length, TRUE, &outBcb, &localBuffer);
|
CcMapDataCommon(FileObject, FileOffset, Length, TRUE, &outBcb, &localBuffer);
|
||||||
@ -101,7 +101,7 @@ CcMapDataForOverwrite(
|
|||||||
|
|
||||||
while (remainingPages)
|
while (remainingPages)
|
||||||
{
|
{
|
||||||
currentThread->CacheManagerActive = 1;
|
currentThread->ForwardClusterOnly = 1;
|
||||||
if (--remainingPages > readClusterSize)
|
if (--remainingPages > readClusterSize)
|
||||||
{
|
{
|
||||||
currentThread->ReadClusterSize = (remainingPages > 0xF) ? 15 : remainingPages;
|
currentThread->ReadClusterSize = (remainingPages > 0xF) ? 15 : remainingPages;
|
||||||
@ -114,8 +114,8 @@ CcMapDataForOverwrite(
|
|||||||
|
|
||||||
SystemCacheAddress += 4096;
|
SystemCacheAddress += 4096;
|
||||||
}
|
}
|
||||||
|
/* Restore to the saved state*/
|
||||||
currentThread->CacheManagerActive = savedState & 1;
|
currentThread->ForwardClusterOnly = savedState & 1;
|
||||||
currentThread->ReadClusterSize = savedState >> 1;
|
currentThread->ReadClusterSize = savedState >> 1;
|
||||||
*Bcb = outBcb;
|
*Bcb = outBcb;
|
||||||
*Buffer = localBuffer;
|
*Buffer = localBuffer;
|
||||||
|
Loading…
Reference in New Issue
Block a user