mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 05:00:27 +00:00
[NTOS:CC]
- Actually flush the whole file in CcFlushCache if FileOffset is NULL instead of just the first 4GB svn path=/trunk/; revision=64006
This commit is contained in:
parent
da56d4c1d6
commit
c7f9f5aaca
1 changed files with 6 additions and 11 deletions
|
@ -865,6 +865,7 @@ CcFlushCache (
|
||||||
{
|
{
|
||||||
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
||||||
LARGE_INTEGER Offset;
|
LARGE_INTEGER Offset;
|
||||||
|
LONGLONG RemainingLength;
|
||||||
PROS_VACB current;
|
PROS_VACB current;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
KIRQL oldIrql;
|
KIRQL oldIrql;
|
||||||
|
@ -879,11 +880,12 @@ CcFlushCache (
|
||||||
if (FileOffset)
|
if (FileOffset)
|
||||||
{
|
{
|
||||||
Offset = *FileOffset;
|
Offset = *FileOffset;
|
||||||
|
RemainingLength = Length;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Offset.QuadPart = (LONGLONG)0;
|
Offset.QuadPart = 0;
|
||||||
Length = SharedCacheMap->FileSize.u.LowPart;
|
RemainingLength = SharedCacheMap->FileSize.QuadPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IoStatus)
|
if (IoStatus)
|
||||||
|
@ -892,7 +894,7 @@ CcFlushCache (
|
||||||
IoStatus->Information = 0;
|
IoStatus->Information = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (Length > 0)
|
while (RemainingLength > 0)
|
||||||
{
|
{
|
||||||
current = CcRosLookupVacb(SharedCacheMap, Offset.u.LowPart);
|
current = CcRosLookupVacb(SharedCacheMap, Offset.u.LowPart);
|
||||||
if (current != NULL)
|
if (current != NULL)
|
||||||
|
@ -915,14 +917,7 @@ CcFlushCache (
|
||||||
}
|
}
|
||||||
|
|
||||||
Offset.QuadPart += VACB_MAPPING_GRANULARITY;
|
Offset.QuadPart += VACB_MAPPING_GRANULARITY;
|
||||||
if (Length > VACB_MAPPING_GRANULARITY)
|
RemainingLength -= min(RemainingLength, VACB_MAPPING_GRANULARITY);
|
||||||
{
|
|
||||||
Length -= VACB_MAPPING_GRANULARITY;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Length = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue