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

inotify doesn't surface UNMOUNT events #627

Open
awused opened this issue Jul 29, 2024 · 1 comment
Open

inotify doesn't surface UNMOUNT events #627

awused opened this issue Jul 29, 2024 · 1 comment

Comments

@awused
Copy link

awused commented Jul 29, 2024

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 }
@NatKarmios
Copy link

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

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