Re: I discussed reading directories as files with jra, Stallman, and loic

Linus Torvalds (torvalds@transmeta.com)
Sun, 20 Jun 1999 16:09:35 -0700 (PDT)


On Sun, 20 Jun 1999, Alexander Viro wrote:
>
> What I see here is that lookup_dentry() will... Oh, my. Yes, it will work,
> but... Arrgh. I'ld rather change the order of tests in lookup_dentry() and
> avoid checking LOOKUP_CONTINUE in the method. By the way, your version
> will *not* work for foo/dir/ - it will follow the link ;-)

Oh, I wouldn't be surprised if small changes would be needed, but they
really should be pretty much one-liners.

> Linus, I see your point here, but IMO it means only one thing - that we
> should stop pretending that those objects are symlinks. They are
> different. Yes, we have one more type of object. Call it VFS-link,
> wormhole, whatever.

They are NOT symlinks. They never were. It so happens that the VFS
_method_ is called "follow_link", but yes, you might as well call it
"wormhole".

It so happens that for a traditional "unix" symlink, the "wormhole()"
method implies reading the link and looking it up.

> I'm still curious - what are you going to do with rename()? Can the
> "default" file be separated from its directory?

It depends on the filesystem. The "wormhole()" operation might be
equivalent to following a link through a fixed name, but it could be
something else altogether (it could result in another dentry, but with the
same inode - a strange kind of magic hardlink).

That's a low-level FS issue, and should just be decided on implementation
and usability concerns rather than anything else..

Linus

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