mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[FASTFAT] More FS statistics
This commit is contained in:
parent
63dcfd2de3
commit
8503842309
1 changed files with 26 additions and 4 deletions
|
@ -673,6 +673,9 @@ VfatRead(
|
||||||
Status = /*STATUS_END_OF_FILE*/STATUS_SUCCESS;
|
Status = /*STATUS_END_OF_FILE*/STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Base.UserFileReads, 1);
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Base.UserFileReadBytes, Length);
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
if (IrpContext->FileObject->PrivateCacheMap == NULL)
|
if (IrpContext->FileObject->PrivateCacheMap == NULL)
|
||||||
|
@ -722,8 +725,16 @@ VfatRead(
|
||||||
Length = (ULONG)(ROUND_UP_64(Fcb->RFCB.FileSize.QuadPart, BytesPerSector) - ByteOffset.QuadPart);
|
Length = (ULONG)(ROUND_UP_64(Fcb->RFCB.FileSize.QuadPart, BytesPerSector) - ByteOffset.QuadPart);
|
||||||
}
|
}
|
||||||
|
|
||||||
vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedReads, 1);
|
if (!IsVolume)
|
||||||
vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedReadBytes, Length);
|
{
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedReads, 1);
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedReadBytes, Length);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Base.MetaDataReads, 1);
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Base.MetaDataReadBytes, Length);
|
||||||
|
}
|
||||||
|
|
||||||
Status = VfatReadFileData(IrpContext, Length, ByteOffset, &ReturnedLength);
|
Status = VfatReadFileData(IrpContext, Length, ByteOffset, &ReturnedLength);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
|
@ -954,6 +965,9 @@ VfatWrite(
|
||||||
{
|
{
|
||||||
// cached write
|
// cached write
|
||||||
|
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Base.UserFileWrites, 1);
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Base.UserFileWriteBytes, Length);
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
if (IrpContext->FileObject->PrivateCacheMap == NULL)
|
if (IrpContext->FileObject->PrivateCacheMap == NULL)
|
||||||
|
@ -1006,8 +1020,16 @@ VfatWrite(
|
||||||
CcZeroData(IrpContext->FileObject, &OldFileSize, &ByteOffset, TRUE);
|
CcZeroData(IrpContext->FileObject, &OldFileSize, &ByteOffset, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedWrites, 1);
|
if (!IsVolume)
|
||||||
vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedWriteBytes, Length);
|
{
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedWrites, 1);
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedWriteBytes, Length);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Base.MetaDataWrites, 1);
|
||||||
|
vfatAddToStat(IrpContext->DeviceExt, Base.MetaDataWriteBytes, Length);
|
||||||
|
}
|
||||||
|
|
||||||
Status = VfatWriteFileData(IrpContext, Length, ByteOffset);
|
Status = VfatWriteFileData(IrpContext, Length, ByteOffset);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
|
|
Loading…
Reference in a new issue