inotify doesn't surface UNMOUNT events
System details
- OS/Platform name and version: Linux, Fedora 40, Kernel 6.8
- Rust version (if building from source):
rustc --version: rustc 1.80.0 (051478957 2024-07-21) - Notify version (or commit hash if building from git): 6.1.1
- If you're coming from a project that makes use of Notify, what it is, and a link to the downstream issue if there is one: My personal file manager
- Filesystem type and options: zfs, tmpfs, and zfs over nfs
- On Linux: Kernel version: 6.8
What you did (as detailed as you can)
I first noticed this when I noticed some of my notify watches would stop producing events for changes from the local machine on some directories. Eventually I traced it to NFS automatically unmounting idle file systems, which is annoying, but if I had gotten notified of the issue I could have worked around it by resubscribing.
This bug is not specific to NFS, and the same problems occur locally as well when unmounting filesystems. I tested this with zfs and tmpfs locally.
What you expected
The events are sent to the event handler so I can decide how to handle them.
What happened
I see these logs, but no events are handled because they're not covered by any cases in handle_inotify. Ideally I'd have some way to tie that id back to a specific directory I was watching and reconnect or otherwise handle it.
1627.979 TRACE notify::inotify > inotify event: Event { wd: WatchDescriptor { id: 13, fd: (Weak) }, mask: ISDIR | UNMOUNT, cookie: 0, name: None }
1627.979 TRACE notify::inotify > inotify event: Event { wd: WatchDescriptor { id: 13, fd: (Weak) }, mask: IGNORED, cookie: 0, name: None }
Getting the same issue here.
- OS: SteamOS (rolling release)
- Rust version: 1.80.1
- Notify version: 6.1.1
- Filesystem type: ext4 on removable SD card
- Kernel version: 6.1.52-valve16-1-neptune-61