mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
[NTOS:CC] Fix some debug prints
svn path=/trunk/; revision=65830
This commit is contained in:
parent
373fb8c25c
commit
723f55af2c
3 changed files with 31 additions and 50 deletions
37
reactos/ntoskrnl/cache/fssup.c
vendored
37
reactos/ntoskrnl/cache/fssup.c
vendored
|
@ -230,14 +230,13 @@ CcInitializeCacheMap(IN PFILE_OBJECT FileObject,
|
||||||
RtlCopyMemory(&Map->Callbacks, Callbacks, sizeof(*Callbacks));
|
RtlCopyMemory(&Map->Callbacks, Callbacks, sizeof(*Callbacks));
|
||||||
|
|
||||||
/* For now ... */
|
/* For now ... */
|
||||||
DPRINT("FileSizes->ValidDataLength %08x%08x\n",
|
DPRINT("FileSizes->ValidDataLength %I64x\n",
|
||||||
FileSizes->ValidDataLength.HighPart,
|
FileSizes->ValidDataLength.QuadPart);
|
||||||
FileSizes->ValidDataLength.LowPart);
|
|
||||||
|
|
||||||
InitializeListHead(&Map->AssociatedBcb);
|
InitializeListHead(&Map->AssociatedBcb);
|
||||||
InitializeListHead(&Map->PrivateCacheMaps);
|
InitializeListHead(&Map->PrivateCacheMaps);
|
||||||
InsertTailList(&CcpAllSharedCacheMaps, &Map->Entry);
|
InsertTailList(&CcpAllSharedCacheMaps, &Map->Entry);
|
||||||
DPRINT("New Map %x\n", Map);
|
DPRINT("New Map %p\n", Map);
|
||||||
}
|
}
|
||||||
/* We don't have a private cache map. Link it with the shared cache map
|
/* We don't have a private cache map. Link it with the shared cache map
|
||||||
to serve as a held reference. When the list in the shared cache map
|
to serve as a held reference. When the list in the shared cache map
|
||||||
|
@ -423,11 +422,9 @@ CcZeroData(IN PFILE_OBJECT FileObject,
|
||||||
PVOID PinnedBcb, PinnedBuffer;
|
PVOID PinnedBcb, PinnedBuffer;
|
||||||
PNOCC_CACHE_MAP Map = FileObject->SectionObjectPointer->SharedCacheMap;
|
PNOCC_CACHE_MAP Map = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||||
|
|
||||||
DPRINT("S %08x%08x E %08x%08x\n",
|
DPRINT("S %I64x E %I64x\n",
|
||||||
StartOffset->u.HighPart,
|
StartOffset->QuadPart,
|
||||||
StartOffset->u.LowPart,
|
EndOffset->QuadPart);
|
||||||
EndOffset->u.HighPart,
|
|
||||||
EndOffset->u.LowPart);
|
|
||||||
|
|
||||||
if (!Map)
|
if (!Map)
|
||||||
{
|
{
|
||||||
|
@ -449,9 +446,8 @@ CcZeroData(IN PFILE_OBJECT FileObject,
|
||||||
ToWrite = MIN(UpperBound.QuadPart - LowerBound.QuadPart,
|
ToWrite = MIN(UpperBound.QuadPart - LowerBound.QuadPart,
|
||||||
(PAGE_SIZE - LowerBound.QuadPart) & (PAGE_SIZE - 1));
|
(PAGE_SIZE - LowerBound.QuadPart) & (PAGE_SIZE - 1));
|
||||||
|
|
||||||
DPRINT("Zero last half %08x%08x %x\n",
|
DPRINT("Zero last half %I64x %lx\n",
|
||||||
Target.u.HighPart,
|
Target.QuadPart,
|
||||||
Target.u.LowPart,
|
|
||||||
ToWrite);
|
ToWrite);
|
||||||
|
|
||||||
Status = MiSimpleRead(FileObject,
|
Status = MiSimpleRead(FileObject,
|
||||||
|
@ -467,7 +463,7 @@ CcZeroData(IN PFILE_OBJECT FileObject,
|
||||||
RtlRaiseStatus(Status);
|
RtlRaiseStatus(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("RtlZeroMemory(%x,%x)\n",
|
DPRINT1("RtlZeroMemory(%p, %lx)\n",
|
||||||
ZeroBuf + LowerBound.QuadPart - Target.QuadPart,
|
ZeroBuf + LowerBound.QuadPart - Target.QuadPart,
|
||||||
ToWrite);
|
ToWrite);
|
||||||
|
|
||||||
|
@ -494,9 +490,8 @@ CcZeroData(IN PFILE_OBJECT FileObject,
|
||||||
|
|
||||||
while (UpperBound.QuadPart - Target.QuadPart > PAGE_SIZE)
|
while (UpperBound.QuadPart - Target.QuadPart > PAGE_SIZE)
|
||||||
{
|
{
|
||||||
DPRINT("Zero full page %08x%08x\n",
|
DPRINT("Zero full page %I64x\n",
|
||||||
Target.u.HighPart,
|
Target.QuadPart);
|
||||||
Target.u.LowPart);
|
|
||||||
|
|
||||||
Status = MiSimpleWrite(FileObject,
|
Status = MiSimpleWrite(FileObject,
|
||||||
&Target,
|
&Target,
|
||||||
|
@ -515,9 +510,8 @@ CcZeroData(IN PFILE_OBJECT FileObject,
|
||||||
if (UpperBound.QuadPart > Target.QuadPart)
|
if (UpperBound.QuadPart > Target.QuadPart)
|
||||||
{
|
{
|
||||||
ToWrite = UpperBound.QuadPart - Target.QuadPart;
|
ToWrite = UpperBound.QuadPart - Target.QuadPart;
|
||||||
DPRINT("Zero first half %08x%08x %x\n",
|
DPRINT("Zero first half %I64x %lx\n",
|
||||||
Target.u.HighPart,
|
Target.QuadPart,
|
||||||
Target.u.LowPart,
|
|
||||||
ToWrite);
|
ToWrite);
|
||||||
|
|
||||||
Status = MiSimpleRead(FileObject,
|
Status = MiSimpleRead(FileObject,
|
||||||
|
@ -563,10 +557,9 @@ CcZeroData(IN PFILE_OBJECT FileObject,
|
||||||
if (Bcb->FileOffset.QuadPart + Bcb->Length >= LowerBound.QuadPart &&
|
if (Bcb->FileOffset.QuadPart + Bcb->Length >= LowerBound.QuadPart &&
|
||||||
Bcb->FileOffset.QuadPart < UpperBound.QuadPart)
|
Bcb->FileOffset.QuadPart < UpperBound.QuadPart)
|
||||||
{
|
{
|
||||||
DPRINT("Bcb #%x (@%08x%08x)\n",
|
DPRINT("Bcb #%x (@%I64x)\n",
|
||||||
Bcb - CcCacheSections,
|
Bcb - CcCacheSections,
|
||||||
Bcb->FileOffset.u.HighPart,
|
Bcb->FileOffset.QuadPart);
|
||||||
Bcb->FileOffset.u.LowPart);
|
|
||||||
|
|
||||||
Target.QuadPart = MAX(Bcb->FileOffset.QuadPart,
|
Target.QuadPart = MAX(Bcb->FileOffset.QuadPart,
|
||||||
LowerBound.QuadPart);
|
LowerBound.QuadPart);
|
||||||
|
|
35
reactos/ntoskrnl/cache/pinsup.c
vendored
35
reactos/ntoskrnl/cache/pinsup.c
vendored
|
@ -486,10 +486,9 @@ CcpMapData(IN PFILE_OBJECT FileObject,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("CcMapData(F->%x,%08x%08x:%d)\n",
|
DPRINT("CcMapData(F->%x, %I64x:%d)\n",
|
||||||
FileObject,
|
FileObject,
|
||||||
FileOffset->HighPart,
|
FileOffset->QuadPart,
|
||||||
FileOffset->LowPart,
|
|
||||||
Length);
|
Length);
|
||||||
|
|
||||||
ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
|
ASSERT(KeGetCurrentIrql() < DISPATCH_LEVEL);
|
||||||
|
@ -510,10 +509,9 @@ CcpMapData(IN PFILE_OBJECT FileObject,
|
||||||
*BcbResult = Bcb;
|
*BcbResult = Bcb;
|
||||||
*Buffer = ((PCHAR)Bcb->BaseAddress) + (int)(FileOffset->QuadPart - Bcb->FileOffset.QuadPart);
|
*Buffer = ((PCHAR)Bcb->BaseAddress) + (int)(FileOffset->QuadPart - Bcb->FileOffset.QuadPart);
|
||||||
|
|
||||||
DPRINT("Bcb #%x Buffer maps (%08x%08x) At %x Length %x (Getting %x:%x) %wZ\n",
|
DPRINT("Bcb #%x Buffer maps (%I64x) At %x Length %x (Getting %p:%x) %wZ\n",
|
||||||
Bcb - CcCacheSections,
|
Bcb - CcCacheSections,
|
||||||
Bcb->FileOffset.HighPart,
|
Bcb->FileOffset.QuadPart,
|
||||||
Bcb->FileOffset.LowPart,
|
|
||||||
Bcb->BaseAddress,
|
Bcb->BaseAddress,
|
||||||
Bcb->Length,
|
Bcb->Length,
|
||||||
*Buffer,
|
*Buffer,
|
||||||
|
@ -524,9 +522,8 @@ CcpMapData(IN PFILE_OBJECT FileObject,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("File size %08x%08x\n",
|
DPRINT("File size %I64x\n",
|
||||||
Map->FileSizes.ValidDataLength.HighPart,
|
Map->FileSizes.ValidDataLength.QuadPart);
|
||||||
Map->FileSizes.ValidDataLength.LowPart);
|
|
||||||
|
|
||||||
/* Not all files have length, in fact filesystems often use stream file
|
/* Not all files have length, in fact filesystems often use stream file
|
||||||
objects for various internal purposes and are loose about the file
|
objects for various internal purposes and are loose about the file
|
||||||
|
@ -635,7 +632,6 @@ retry:
|
||||||
* in the NOCC_CACHE_MAP.
|
* in the NOCC_CACHE_MAP.
|
||||||
*/
|
*/
|
||||||
Success = TRUE;
|
Success = TRUE;
|
||||||
//DPRINT("w1n\n");
|
|
||||||
|
|
||||||
Bcb->Length = MIN(Map->FileSizes.ValidDataLength.QuadPart - Target.QuadPart,
|
Bcb->Length = MIN(Map->FileSizes.ValidDataLength.QuadPart - Target.QuadPart,
|
||||||
CACHE_STRIPE);
|
CACHE_STRIPE);
|
||||||
|
@ -649,10 +645,9 @@ retry:
|
||||||
*Buffer = ((PCHAR)Bcb->BaseAddress) + (int)(FileOffset->QuadPart - Bcb->FileOffset.QuadPart);
|
*Buffer = ((PCHAR)Bcb->BaseAddress) + (int)(FileOffset->QuadPart - Bcb->FileOffset.QuadPart);
|
||||||
FaultIn = TRUE;
|
FaultIn = TRUE;
|
||||||
|
|
||||||
DPRINT("Bcb #%x Buffer maps (%08x%08x) At %x Length %x (Getting %x:%x) %wZ\n",
|
DPRINT("Bcb #%x Buffer maps (%I64x) At %x Length %x (Getting %p:%lx) %wZ\n",
|
||||||
Bcb - CcCacheSections,
|
Bcb - CcCacheSections,
|
||||||
Bcb->FileOffset.HighPart,
|
Bcb->FileOffset.QuadPart,
|
||||||
Bcb->FileOffset.LowPart,
|
|
||||||
Bcb->BaseAddress,
|
Bcb->BaseAddress,
|
||||||
Bcb->Length,
|
Bcb->Length,
|
||||||
*Buffer,
|
*Buffer,
|
||||||
|
@ -663,8 +658,6 @@ retry:
|
||||||
ASSERT((EndInterval.QuadPart & ~(CACHE_STRIPE - 1)) ==
|
ASSERT((EndInterval.QuadPart & ~(CACHE_STRIPE - 1)) ==
|
||||||
(Bcb->FileOffset.QuadPart & ~(CACHE_STRIPE - 1)));
|
(Bcb->FileOffset.QuadPart & ~(CACHE_STRIPE - 1)));
|
||||||
|
|
||||||
//DPRINT("TERM!\n");
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
CcpUnlock();
|
CcpUnlock();
|
||||||
if (Success)
|
if (Success)
|
||||||
|
@ -675,10 +668,9 @@ cleanup:
|
||||||
ULONG i;
|
ULONG i;
|
||||||
PCHAR FaultIn = Bcb->BaseAddress;
|
PCHAR FaultIn = Bcb->BaseAddress;
|
||||||
|
|
||||||
DPRINT("Faulting in pages at this point: file %wZ %08x%08x:%x\n",
|
DPRINT("Faulting in pages at this point: file %wZ %I64x:%x\n",
|
||||||
&FileObject->FileName,
|
&FileObject->FileName,
|
||||||
Bcb->FileOffset.HighPart,
|
Bcb->FileOffset.QuadPart,
|
||||||
Bcb->FileOffset.LowPart,
|
|
||||||
Bcb->Length);
|
Bcb->Length);
|
||||||
|
|
||||||
for (i = 0; i < Bcb->Length; i += PAGE_SIZE)
|
for (i = 0; i < Bcb->Length; i += PAGE_SIZE)
|
||||||
|
@ -873,15 +865,14 @@ CcPreparePinWrite(IN PFILE_OBJECT FileObject,
|
||||||
|
|
||||||
if (Zero)
|
if (Zero)
|
||||||
{
|
{
|
||||||
DPRINT("Zero fill #%x %08x%08x:%x Buffer %x %wZ\n",
|
DPRINT("Zero fill #%x %I64x:%x Buffer %x %wZ\n",
|
||||||
RealBcb - CcCacheSections,
|
RealBcb - CcCacheSections,
|
||||||
FileOffset->u.HighPart,
|
FileOffset->QuadPart,
|
||||||
FileOffset->u.LowPart,
|
|
||||||
Length,
|
Length,
|
||||||
*Buffer,
|
*Buffer,
|
||||||
&FileObject->FileName);
|
&FileObject->FileName);
|
||||||
|
|
||||||
DPRINT1("RtlZeroMemory(%x,%x)\n", *Buffer, Length);
|
DPRINT1("RtlZeroMemory(%p, %lx)\n", *Buffer, Length);
|
||||||
RtlZeroMemory(*Buffer, Length);
|
RtlZeroMemory(*Buffer, Length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
9
reactos/ntoskrnl/cache/section/data.c
vendored
9
reactos/ntoskrnl/cache/section/data.c
vendored
|
@ -389,7 +389,7 @@ MmCreateCacheSection(PROS_SECTION_OBJECT *SectionObject,
|
||||||
FileSizes.ValidDataLength = FileInfo.EndOfFile;
|
FileSizes.ValidDataLength = FileInfo.EndOfFile;
|
||||||
FileSizes.FileSize = FileInfo.EndOfFile;
|
FileSizes.FileSize = FileInfo.EndOfFile;
|
||||||
}
|
}
|
||||||
DPRINT("Got %08x\n", FileSizes.ValidDataLength.u.LowPart);
|
DPRINT("Got %I64x\n", FileSizes.ValidDataLength.QuadPart);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FIXME: Revise this once a locking order for file size changes is
|
* FIXME: Revise this once a locking order for file size changes is
|
||||||
|
@ -399,15 +399,12 @@ MmCreateCacheSection(PROS_SECTION_OBJECT *SectionObject,
|
||||||
*/
|
*/
|
||||||
if (UMaximumSize != NULL && UMaximumSize->QuadPart)
|
if (UMaximumSize != NULL && UMaximumSize->QuadPart)
|
||||||
{
|
{
|
||||||
DPRINT("Taking maximum %x\n", UMaximumSize->LowPart);
|
DPRINT("Taking maximum %I64x\n", UMaximumSize->QuadPart);
|
||||||
MaximumSize.QuadPart = UMaximumSize->QuadPart;
|
MaximumSize.QuadPart = UMaximumSize->QuadPart;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("Got file size %08x%08x\n",
|
DPRINT("Got file size %I64x\n", FileSizes.FileSize.QuadPart);
|
||||||
FileSizes.FileSize.u.HighPart,
|
|
||||||
FileSizes.FileSize.u.LowPart);
|
|
||||||
|
|
||||||
MaximumSize.QuadPart = FileSizes.FileSize.QuadPart;
|
MaximumSize.QuadPart = FileSizes.FileSize.QuadPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue