Re: silent semantic changes with reiser4

Linus Torvalds
2004-08-29T05:12:39Z

On Sat, 28 Aug 2004 viro@parcelfarce.linux.theplanet.co.uk wrote:
>
> OK, forget getcwd(). What does lookup of .. do from that point? *Especially*
> for stuff you've got from regular files. That's the decision that needs to
> be made.

I think that will decide on whether we expose attributes through the
normal namespace or not.

If we do expose them in the normal namespace, then ".." should work the
way the namespace looks: if you do ".." on the "attribute directory" of a
file, you get the directory that the file was in. Ie an old-style
user-space "getcwd()" would give the right path (well, an old-style
user-space getcwd() would probably refuse the file on the base that it is
S_IFREG, but ignoring that..)

If we _don't_ expose it in the normal namespace, we should should either
just error out (logically you'd get the file itself, but I really don't
wan tto have ".." return a non-directory, because _that_ really might
confuse things), or you'd just return the same directory (ie it would be a
"local root" in the namespace you got moved to).

So let's try to be self-consistent with how we expose it in the normal
namespace.

Linus