Menu

#664 Periodic Inotify CLOSE_WRITE events from browsing in Finder

open
nobody
None
1
2020-12-16
2020-12-16
No

It seems spontaneous Inotify CLOSE_WRITE events are generated periodically from simply mounting and browsing an AFP share. This leads tools like the Listen Rubygem to report file modifications, which then drains the battery because the test suite is ran way too often.

To reproduce

  1. watch a directory for CLOSE_WRITE and MODIFY events: inotifywait . -m -r -e CLOSE_WRITE -e MODIFY
  2. export AFP share
  3. mount a Linux directory over AFP as a macOS volume
  4. open or simply expand a directory on the share in Finder

Share definition

/usr/local/etc/afp.conf:

[dev]
path = /home/user/my_share

Effect

$ cd ~/my_share/my_project
$ inotifywait . -m -r -e CLOSE_WRITE -e MODIFY
Setting up watches.  Beware: since -r was given, this may take a while!
Watches established.
./ CLOSE_WRITE,CLOSE TODO~
./ CLOSE_WRITE,CLOSE Rakefile
./ CLOSE_WRITE,CLOSE TODO
./ CLOSE_WRITE,CLOSE README.md
./ CLOSE_WRITE,CLOSE LICENSE.txt
./ CLOSE_WRITE,CLOSE Gemfile.lock
./ CLOSE_WRITE,CLOSE Guardfile
./ CLOSE_WRITE,CLOSE Gemfile

Some of these seem to happen periodically/sporadically.

Expectation

I expect to see no CLOSE_WRITE events from browsing.

Versions

Netatalk 3.1.12
Ubuntu 20.04
macOS 11.1
inotifywait 3.14
Linux 4.15.0-126-generic #129-Ubuntu SMP Mon Nov 23 18:53:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Discussion


Log in to post a comment.

MongoDB Logo MongoDB