In message <8ghn4m$965$[EMAIL PROTECTED]>, Ton Hospel writes:
> In article <[EMAIL PROTECTED]>,
>       "Theodore Y. Ts'o" <[EMAIL PROTECTED]> writes:
> > 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.
> > 
> 
> Still, that's pretty yucky. Inode based notification should be the default
> behaviour, with the others the exception (for the others the filename path
> is usually the ONLY path).

I think there are uses for notification on a change for inodes and dentries,
maybe even files.  Some information is available in one and not in the
others.  Nevertheless, it's clear that inode notification is the first most
obvious choice.

> I don't care HOW my files got changed, just if they got changed.
> 
> Good thing directory hardlinking is very rare. on the other hand,
> multiple mounting is coming....

AFAIK, directory hard-linking isn't available in Linux, and that's a good
thing.  Not just was this a seldom used feature, but it wrecked havoc on
recursive programs like find, rm, and even backup tools like Legato
Networker.  The reason was that you cd to a directory in one way, but when
you cd out of it (cd ..) you find yourself ... "transported through a
wormhole to another dimension..."

You bring an interesting point, however.  With the new multiple mounting and
vfsmount stuff, I hope that we're not re-introducing the same problems that
directory hard-linking caused.

Erez.

Reply via email to