Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requset support for DOKAN_CHECK_INTERVAL adjustable. #1094

Closed
5 tasks
onexzero opened this issue May 21, 2022 · 1 comment
Closed
5 tasks

Requset support for DOKAN_CHECK_INTERVAL adjustable. #1094

onexzero opened this issue May 21, 2022 · 1 comment

Comments

@onexzero
Copy link

Feature request can skip this form. Bug report must complete it. Check List must be 100% match or it will be automatically closed without further discussion. Please remove this line.

Environment

  • Windows version:
  • Processor architecture:
  • Dokany version:
  • Library type (Dokany/FUSE):

Check List

  • I checked my issue doesn't exist yet
  • My issue is valid with mirror default sample and not specific to my user-mode driver implementation
  • I can always reproduce the issue with the provided description below.
  • I have updated Dokany to the latest version and have reboot my computer after.
  • I tested one of the last snapshot from appveyor CI

Description

It would be nice if DOKAN_CHECK_INTERVAL could be set. Currently, it seems to be set to 5 seconds internally, but I wish it was supported so that it can be set through DokanOption. Even if the current DokanOption timeout value is reduced to 1 second, this value is applied to 5 seconds because DOKAN_CHECK_INTERVAL is 5 seconds. To improve responsiveness, it would be nice to be able to set this value by user.
This issue is related to the following issue:
#1058 (comment)

Logs

Please attach in separate files: mirror output, library logs and kernel logs.
In case of BSOD, please attach minidump or dump analyze output.

@Liryna
Copy link
Member

Liryna commented May 22, 2022

The minimum value that can be enforced is DOKAN_IRP_PENDING_TIMEOUT which a 1/3 of DOKAN_CHECK_INTERVAL

dokany/sys/dokan.h

Lines 126 to 128 in 0a85053

#define DOKAN_IRP_PENDING_TIMEOUT (1000 * 15) // in millisecond
#define DOKAN_IRP_PENDING_TIMEOUT_RESET_MAX (1000 * 60 * 5) // in millisecond
#define DOKAN_CHECK_INTERVAL (1000 * 5) // in millisecond

dokany/sys/event.c

Lines 1016 to 1026 in 6bd609b

dcb->IrpTimeout = DOKAN_IRP_PENDING_TIMEOUT;
if (eventStart->IrpTimeout > 0) {
if (eventStart->IrpTimeout > DOKAN_IRP_PENDING_TIMEOUT_RESET_MAX) {
eventStart->IrpTimeout = DOKAN_IRP_PENDING_TIMEOUT_RESET_MAX;
}
if (eventStart->IrpTimeout < DOKAN_IRP_PENDING_TIMEOUT) {
eventStart->IrpTimeout = DOKAN_IRP_PENDING_TIMEOUT;
}
dcb->IrpTimeout = eventStart->IrpTimeout;
}

I see why you made the request because the create being canceled should not have to wait at all to be canceled and can be handled differently
#1058 (comment)

Let me know if that's incorrect and will reopen this.

@Liryna Liryna closed this as completed May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants