So a client adds a watch and the server needs to then physically add theYes, this creates the interesting situation of two responses (one from the local client code, and one from the server) potentially coming as a client changes a file which he has a watch on.
If you have a user-space, user-space could just add an inotify watch.Yes - add watch could be exported, I don't see a way around this since a filesystem has to be able to tell the server what to watch. It does not really matter if that were done in kernel or not, but I would prefer it to be done in kernel since that would avoid having to ioctl down to the kernel
But I guess you live entirely in kernel-space? Couldn't we just export
our "add watch" interface to you?