I don't think dnotify/inotify handles subdirectories well yet, so I
suppose that they would have to be extended.
The daemon saves state before it shuts down and reloads the state
after a reboot. You have to make sure that it is started first and
stopped last during the boot process. How would a kernel plugin
handle things that happen before or after the plugin module has been
loaded? It's the same problem.
Sure you can. First of all, you can just wait for the daemon to
finish indexing any files that it has been notified about changes in.
This is no different from you having to wait for the kernel to finish
indexing the files. Or are you suggesting that the kernel should stop
all other processes until the indexing is done?
If you have a good notify, it's not harder.
So how do you calculate the MD5 sum of a file that is in the process
of being modified? It's not possible to do that unless you block all
other access to that file and recalculate the MD5 sum after each
write. With a notifier that tells the daemon that it has stale data
and needs to reprocess the file, it's no different.
/Christer
--
"Just how much can I get away with and still go to heaven?"
Freelance consultant specializing in device driver programming for Linux
Christer Weinigel <christer@weinigel.se> http://www.weinigel.se