Messages in this thread | | | Date | Fri, 5 Apr 2013 17:12:29 +0100 | From | Al Viro <> | Subject | Re: Beyond inotify recursive watches |
| |
On Fri, Apr 05, 2013 at 05:55:34PM +0200, Jan Kara wrote:
> What your question reminds me is an idea of recursive modification time > stamp on directories. That is a time stamp that gets updated whenever > anything in the tree under the directory changes. Now this would be too > expensive to maintain so there's also a trick implemented that you update > the time stamp (and continue updating recursive time stamps upwards) only > if a special flag is set on the directory. And you clear the flag at that > moment. So until someone checks the time stamp and resets the flag no > further updates of the recursive modification time happen. > > This scheme works for arbitrary number of processes interested in recursive > time stamps (only updates of the time stamps get more frequent). What is > somewhat inconvenient is that this only tells you something in the > directory or its subtree changed so you still have to scan all the > directories on the path to modified file. So I'm not sure of how much use > this would be to you.
Feel free to write up the details of locking you'll need for that. It will *not* be fun...
| |