I have an app that needs to handle some minimal work every time a file is created or opened on a enabled filesystem.
My code is actually kernel code, but I'm thinking of registering it a consumer of kernel space inotify notifications.
My concern is efficiency during the initial registration process that will need to occur with every mount, it appears the inotify is not recursive on it's directory monitoring, so at each mount, I would need to walk the directory tree and add a inotify watch for every directory on the filesystem.
That seems excessive, but I think tools like beagle and friends do something similar. How do they address the performance issues of just the registration process?