|
|
Subscribe / Log in / New account

Filesystem notification, part 2: A deeper investigation of inotify

Filesystem notification, part 2: A deeper investigation of inotify

Posted Jul 21, 2014 9:06 UTC (Mon) by JIghtuse (guest, #95703)
Parent article: Filesystem notification, part 2: A deeper investigation of inotify

I found a weird inotify limitation: it cannot detect mounting event on watching directory. If we have some directory and set inotify watch on it and then we mount something to this directory, inotify will not send any events.

This behavior leaks to Qt library too (on Linux at least). If we create some directory, open it in Qt's QFileTree and then mount to it, directory will be empty. Collapsing and expanding of parent nodes will not help. There are two possibilities to see mounted contents: recreate QFileSystemModel attached to QFileTree or reload application itself.

Moreover, you can see this behavior in KDE's dolphin file manager. You can open, say, /media/usb0 (empty directory) and then mount usb drive to it. Instead of showing contents of the drive in opened window, KDE will open a new one, showing contents there. The old one will be empty until you didn't reload it with F5 or something.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds