lkml.org 
[lkml]   [2005]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] inotify 0.22
From
Date
On Mon, 2005-04-04 at 16:50 -0400, Dale Blount wrote:

Hi, Dale.

> Will inotify watch directories recursively? A quick browse through the
> source doesn't look like it, but I very well could be wrong. Last I
> checked, dnotify did not either. I am looking for a way to synchronize
> files in as-real-as-possible-time when they are modified.

No, inotify does not support watching directories recursively. I would
love to add it, but it would be a mess to do inside of the kernel.

Making it easy and efficient to watch a full tree, however, was a goal
of inotify. Beagle, a personal indexing infrastructure, watches the
user's entire home directory.

You could never do this in dnotify because you would run out of file
descriptors and pin every file.

In inotify, it is not hard to write a simple recursive loop to add a
watch to each directory starting at a given path. It can even be done
in an atomic fashion. See

http://mail.gnome.org/archives/dashboard-hackers/2004-October/msg00022.html

wherein I publish such an algorithm.

Hope this helps,

Robert Love


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.041 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site