Reply To: Question to mt-daapd developper (inotify request)

#7166
rpedde
Participant

@quitte wrote:

I’d really love to see support for some file alteration monitor. Firefly is serving more than 60000 files in a network with multiple users here. All users have permission to add files and modify the tags of existing files. With so many changes happening all the time I don’t want to put the extra load of rescanning on the harddisks.
As I cannot solve this problem myself I did the next best thing and searched the web.

I couldn’t find anything about dqueue, so I cannot comment about that.

It seems that dbus actually has some support for watching directories, but not even nautilus uses that. Instead it uses gamin, a drop-in replacement for fam.
The APIs of gamin and fam are the same. fam has dnotify support. gamin has inotify support. Also afaik both can do file system monitoring without any help of the kernel.

As far as I can tell adding fam support should cover all of the filesystem change implementations.

Edit: hmm I read this thread before but forgot about the Problems with fam you mentioned 😳

I might look at them again, as it was a while ago that I looked last and decided it wasn’t usable for workloads like the ones you are describing — 60000 files. It may be that gamin + new kernels might actually work now for huge file sets. It will be a post 1.2 thing, though.