mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-08 13:02:10 -05:00
sys: FspVolumeTransact: timeout early if there are retried IRP completions (to avoid stalling unnecessarily)
This commit is contained in:
parent
a5765defd3
commit
0cf70387ff
@ -730,6 +730,7 @@ VOID FspDeviceDeleteAll(VOID);
|
||||
// STATUS_VOLUME_DISMOUNTED : STATUS_DEVICE_NOT_CONNECTED)
|
||||
|
||||
/* volume management */
|
||||
#define FspVolumeTransactEarlyTimeout (1 * 10000ULL)
|
||||
NTSTATUS FspVolumeCreate(
|
||||
PDEVICE_OBJECT FsctlDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp);
|
||||
VOID FspVolumeDelete(
|
||||
|
@ -619,7 +619,9 @@ NTSTATUS FspVolumeTransact(
|
||||
|
||||
/* wait for an IRP to arrive */
|
||||
KeQuerySystemTime(&Timeout);
|
||||
Timeout.QuadPart += FsvolDeviceExtension->VolumeParams.TransactTimeout * 10000ULL;
|
||||
Timeout.QuadPart += 0 == RepostedIrp ?
|
||||
FsvolDeviceExtension->VolumeParams.TransactTimeout * 10000ULL :
|
||||
FspVolumeTransactEarlyTimeout;
|
||||
/* convert millis to nanos and add to absolute time */
|
||||
while (0 == (PendingIrp = FspIoqNextPendingIrp(FsvolDeviceExtension->Ioq, 0, &Timeout, Irp)))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user