Re: Detecting changes in a directory tree

From: Jeroen van Disseldorp (jdizzl@xs4all.nl)
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
/var.

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
events.

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.

Regards,
  Jeroen mailto:jdizzl@xs4all.nl

-- 
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 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/



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