Re: Detecting changes in a directory tree

From: Jeroen van Disseldorp (
Date: Thu Jan 16 2003 - 22:54:22 EST

On Thursday 16 January 2003 19:59, Adrian Bunk wrote:
> with a kernel >= 2.4.19 dnotify [1] might do what you want.

Close, but is doesn't do it quite for me. I understand the problem of
traversing inodes back up the tree, once they have changed, to see
whether someone wants to receive an event. However I am not convinced
that this is necessary. The idea I had was the following:

I would like to have a passthrough kind of filesystem (lets call is myfs
for now) that can mount other parts of the filesystem and just maps
everything to the original tree. For instance, I would mount /var on
/mnt/var, using myfs. Everything from /mnt/var is directly mapped to

The clue of this is that myfs *knows* about the notification, because it
has to send notification to userspace for *every* inode. So if anything
is written in /mnt/var, it can notify userspace. BTW for my app it
would be acceptable that direct changes in /var don't lead to any

I haven't thought out the interface to userspace yet, but I think that
can be worked out. Let me know if I'm making any sense here.


Be the change that you want to see in the world    -- Gandhi
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Jan 23 2003 - 22:00:15 EST