Date: Mon, 22 May 2000 08:25:05 -0400 From: "Theodore Y. Ts'o" <tytso@MIT.EDU> To: willy@thepuffingroup.com Subject: Re: [prepatch] Directory Notification Date: Sun, 21 May 2000 12:18:30 -0400 From: willy@thepuffingroup.com 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. This was discussed on IRC, but for those who weren't there ---- it should be clear that the current implementation uses dentries, so if you have a file which is hard-linked to appear in two different directories, only the parent directory which was used as an access path when the file was changed would get notified. That is, if /usr/foo/changed_file and /usr/bar/changed_file are hard links, and a user-program modifies /usr/foo/changed_file via that pathname, a server who had asked for directory notification on /usr/bar would not get notified that /usr/bar/changed_file had changed. This is a pretty fundamental limitation, and can't really be fixed without using inode numbers as the notification path; but that requires a very different architecture, and that design wouldn't work for those filesystems that don't use inode numbers. Life is full of tradeoffs. A much more obvious place where directory notification won't work is for any kind of shared filesystem --- i.e., GFS, or any other networked filesystem (NFS, smbfs, etc.). But that's for pretty obvious reasons.... This is not to say that willy's work is bad, but people should understand where it works and where (and why) it won't work. - Ted - 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/