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

How to disable file change notification? #1086

Closed
1 of 5 tasks
onexzero opened this issue Apr 8, 2022 · 8 comments
Closed
1 of 5 tasks

How to disable file change notification? #1086

onexzero opened this issue Apr 8, 2022 · 8 comments

Comments

@onexzero
Copy link

onexzero commented Apr 8, 2022

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: Windows 10,11
  • Processor architecture: AMD 5800X
  • Dokany version: 2.x
  • Library type (Dokany/FUSE): DokAny
    Logfile.zip

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

The exact cause is unknown, but sometimes the window is constantly refreshed. For example, after editing a certain ppt file, the NotifiyChangeDirectory->GetFileInformation->CloseFile->NotifyChangeDirectory..... loop continuously repeats for that file until the Explorer is closed. This does not appear to be a problem with DOKAN itself, but we need a way to block it.

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 Apr 8, 2022

DokanNotifyReportChange is only called when there is a FS action that requires to be notified.
GetFileInformation and CloseFile are not events that call DokanNotifyReportChange unless a file is deleted.

Could you enable the driver logs by using the mount option and look for this line to see which action is reported ?

dokany/sys/dokan.c

Lines 539 to 541 in 70f27b2

DOKAN_LOG_FINE_IRP(RequestContext,
"FCB=%p NameOffset=%x FilterMatch=%x Action=%x Success",
Fcb, nameOffset, FilterMatch, Action);

@onexzero
Copy link
Author

onexzero commented Apr 11, 2022

Occasionally, after editing, saving and exiting PowerPoint, the log

[DokanNotifyReportChange0][FFFFA503F6317010]: FCB=FFFFA503F5C62CF0 NameOffset=2 FilterMatch=10 Action=3 Success

It keeps repeating.
Notify.LOG
Notify.PML.log

[VCB][IRP_MJ_DIRECTORY_CONTROL][IRP_MN_NOTIFY_CHANGE_DIRECTORY]: Begin ProcessId=7820

where 7820 is Windows Explorer.
Why does Explorer keep requesting changes even though the file is no longer changing and has already reported matching events?

@Liryna
Copy link
Member

Liryna commented Apr 11, 2022

Thanks for the logs @onexzero ! Very helpful. I was able to find out what is happening and made a fix 0c1a121
I should schedule a new version in the coming days.

@Liryna Liryna closed this as completed Apr 11, 2022
@onexzero
Copy link
Author

I tested your patch on 32bit windows. it seems to work so far. When a new version comes out, I will test it on 64-bit as well.

@IsaMorphic
Copy link

@Liryna Hello, I'm having an issue with the latest version (2.0.4.1000) where none of the notifications (CreateFile, MoveFile, etc) are happening when using the DokanNet library. I believe it may be related to these changes? If not I will gladly open an issue on the dotnet repo :)

@Liryna
Copy link
Member

Liryna commented May 2, 2022

@yodadude2003 it is unlikely. Could you open an issue ?

@IsaMorphic
Copy link

Can do when I'm on my PC next. 👍

@IsaMorphic
Copy link

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

3 participants