mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 09:22:57 -05:00
sys: statistics: implement FSCTL_FILESYSTEM_GET_STATISTICS
This commit is contained in:
@ -394,6 +394,20 @@ static NTSTATUS FspFsvolWriteNonCached(
|
||||
FspFileNodeSetOwner(FileNode, Full, Request);
|
||||
FspIopRequestContext(Request, RequestIrp) = Irp;
|
||||
|
||||
FSP_STATISTICS *Statistics = FspFsvolDeviceStatistics(FsvolDeviceObject);
|
||||
if (PagingIo)
|
||||
{
|
||||
FspStatisticsInc(Statistics, Base.UserFileWrites);
|
||||
FspStatisticsAdd(Statistics, Base.UserFileWriteBytes, WriteLength);
|
||||
FspStatisticsInc(Statistics, Base.UserDiskWrites);
|
||||
}
|
||||
else
|
||||
{
|
||||
FspStatisticsInc(Statistics, Specific.NonCachedWrites);
|
||||
FspStatisticsAdd(Statistics, Specific.NonCachedWriteBytes, WriteLength);
|
||||
FspStatisticsInc(Statistics, Specific.NonCachedDiskWrites);
|
||||
}
|
||||
|
||||
return FSP_STATUS_IOQ_POST;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user