[net.unix] symlinks as directory entries vs. inodes

chris@umcp-cs.UUCP (Chris Torek) (11/02/86)

In article <8551@sun.uucp> guy@sun.UUCP writes:
>I presume they just decided the added benefits weren't worth the hassle.

What are the benefits supposed to be again?

Faster name translation?  The namei cache takes care of that.
Indeed, the extra code required to skip over the proposed extra
directory entry when scanning for other names might have more of
a slowing effect than any gain provided by having the contents of
the link at hand.

Less disk space used?  Perhaps; but not much, not unless you have
a large number of symlinks.

Fewer inodes used?  How often does one run out of inodes?  newfs is
very conservative about inode allocation.

All in all, I think writing the contents of the link through an
inode is cleaner.  It certainly helps keep namei, already a large
and ugly routine, from being larger and uglier.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@mimsy.umd.edu

guy@sun.uucp (Guy Harris) (11/03/86)

> >I presume they just decided the added benefits weren't worth the hassle.
> 
> What are the benefits supposed to be again?

Well, to quote from the article that claimed they had added benefits:

> From: mangler@cit-vax.Caltech.Edu (System Mangler)
> Newsgroups: net.unix,net.unix-wizards
> Subject: Re: Are links as useful as they could be?
> Message-ID: <1059@cit-vax.Caltech.Edu>
> Organization: California Institute of Technology
> Summary: symbolic links shouldn't have been inodes

> In article <21127@rochester.ARPA> ken@rochester.UUCP (Comfy chair) writes:
> > I don't like symbolic links, there are some warts, like having to check
> > for looping, but I can't think of anything better.

> Warts... you can't chmod, chgrp, utime, or link them.
> The access time never means much, because doing an
> "ls -l" to see it has the side effect of changing it.

> Symbolic links are too expensive to use freely.  They take up
> an inode and 1K of disk space, just to hold a few characters.
> They carry all the baggage of a regular inode (atime, mtime,
> links, owner, group, mode) but you can't make proper use of
> any of it.

Since Don Speck was a defender of the "symbolic links as special directory
entry" idea, while I was not, I'll let him argue the point further.  Note,
however, that one of the objections - the first one listed - was not one of
resource consumption, but one of transparency.
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com (or guy@sun.arpa)