lkml.org 
[lkml]   [2013]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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...


\
 
 \ /
  Last update: 2013-04-05 19:01    [W:0.047 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site