Skip to content

Watch dir causes endless "file modified" notifications #1333

Description

@BeanLiu1994

Check List

  • I checked my issue was mentioned at How to disable file change notification? #1086, the issue is closed but the notify problem still happens.
  • My issue is valid with mirror default sample and not specific to my user-mode driver implementation, tried with memfs and mirror sample.
  • I can always reproduce the issue with the provided description below.
  • I have updated Dokany, using 2.3.1.1000
  • I tested one of the last snapshot from appveyor CI

Describe the bug

On a dokany mounted disk:

  • Open file with a read handle → keep it open for the entire run
  • Open a second write handle → write a few bytes → close the write handle
  • Start a ReadDirectoryChangesW watcher on the parent folder
  • Loop: NotifiyChangeDirectory->GetFileInformation->CloseFile->NotifyChangeDirectory..... loop continuously repeats for that file

To Reproduce
Steps to reproduce the behavior:

  • Mount a Dokan volume (e.g., drive Z:) using the sample and create a test dir.
  • run script.
    python dokan_cleanup_notify_storm_repro.py --dir Z:\test --seconds 10
  • Every single attribute-probe generates a modified notification

dokan_cleanup_notify_storm_repro.py

Expected behavior
Expected: only the real modify should have a notification, same as running this script to a local disk file.
Actual: ~1 notification per query (ratio ≈ 1.000). Thousands/sec queries.

Logs
N/A

Environment:

  • Windows version: Windows 11 23H2
  • Processor architecture: x64
  • Dokany version: 2.3.1.1000
  • Library type (Dokany/FUSE): Dokany

Additional context
N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions