[FASTFAT]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 24 Sep 2017 12:35:37 +0000 (12:35 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 24 Sep 2017 12:35:37 +0000 (12:35 +0000)
Implement statistics counting for non cached read/write operations.

svn path=/trunk/; revision=75961

reactos/drivers/filesystems/fastfat/rw.c

index c3834b5..0ac467d 100644 (file)
@@ -722,6 +722,9 @@ VfatRead(
             Length = (ULONG)(ROUND_UP_64(Fcb->RFCB.FileSize.QuadPart, BytesPerSector) - ByteOffset.QuadPart);
         }
 
+        vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedReads, 1);
+        vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedReadBytes, Length);
+
         Status = VfatReadFileData(IrpContext, Length, ByteOffset, &ReturnedLength);
         if (NT_SUCCESS(Status))
         {
@@ -1003,6 +1006,9 @@ VfatWrite(
             CcZeroData(IrpContext->FileObject, &OldFileSize, &ByteOffset, TRUE);
         }
 
+        vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedWrites, 1);
+        vfatAddToStat(IrpContext->DeviceExt, Fat.NonCachedWriteBytes, Length);
+
         Status = VfatWriteFileData(IrpContext, Length, ByteOffset);
         if (NT_SUCCESS(Status))
         {