Re: [prepatch] Directory Notification

From: Erez Zadok (ezk@cs.columbia.edu)
Date: Mon May 22 2000 - 19:37:00 EST


In message <20000521121830.X28590@thepuffingroup.com>, willy@thepuffingroup.com writes:
> On Sat, May 20, 2000 at 03:31:29PM -0400, Erez Zadok wrote:
> > I looked briefly at the patch, and I'm afraid I don't understand some basic
> > things. Perhaps you can let us (-fsdevel) all know the following (which you
> > should probably put in a README on your Web page along w/ the patches):
>
> > - what is directory notification
> > - what is it good for
>
> Directory notification is a mechanism for informing interested tasks
> when the contents of a directory change. This has immediate applications
> for file managers and ps. Samba benefits from this, and there are some
> non-obvious applications such as a persistent make which perpetually
> keeps a tree up-to-date by noticing modifications to files.

Do you get notified on any change to the directory, files within, even
recursively? Do you get notified if a file's data had changed but the
file's [cm]time etc. didn't change? Is an atime update considered a change?

I think a mechanism for notification can be very useful, but first you have
to decide on what can and/or should be notified. Then on the notification
mechanism: should be a pull, push, or register-and-wait-for-event system?
There advantages and disadvantages to each mechanism. Your signal method
appears OK as a first try. Can you use a better method with a more direct
connection b/t a user process and the kernel (a unix pipe, something ala
kernel-user netlink, shm, maybe out of kernel RPCs, etc.)

I also think you should consider using my stackable templates as a possible
starting point. You'd have the advantage of not having to touch the VFS
proper, and having this mechanism work on top of all f/s, not just ext2.

Erez.

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



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:23 EST