sys: FspFsvolClose: convert CLOSE requests to synchronous when above the IOQ watermark

This commit is contained in:
Bill Zissimopoulos
2021-01-18 15:07:57 -08:00
parent 1dbcae3985
commit 0af0bfbe7c
3 changed files with 14 additions and 2 deletions

View File

@ -643,6 +643,16 @@ ULONG FspIoqPendingIrpCount(FSP_IOQ *Ioq)
return Result;
}
BOOLEAN FspIoqPendingAboveWatermark(FSP_IOQ *Ioq, ULONG Watermark)
{
BOOLEAN Result;
KIRQL Irql;
KeAcquireSpinLock(&Ioq->SpinLock, &Irql);
Result = Watermark < 100 * Ioq->PendingIrpCount / Ioq->PendingIrpCapacity;
KeReleaseSpinLock(&Ioq->SpinLock, Irql);
return Result;
}
BOOLEAN FspIoqStartProcessingIrp(FSP_IOQ *Ioq, PIRP Irp)
{
NTSTATUS Result;