Do you REALLY need hard links?

David Collier-Brown davecb at nexus.YorkU.CA
Wed Oct 10 13:11:16 AEST 1990


jrg at Apple.COM (John R. Galloway Jr.) asks if one needs hard links
in a new file system...

>[ Moderators Note:-
>  Here's one good reason - speed!  It is a lot faster to follow a hard
>  link than a symbolic link.  - Der  ]


   Well, if one only requires the symbolic link to point to objects in a
file system, one can drop the symbolism and implement a "soft" link with the
triple { filesystem type, [unique identifier | mount point], file reference }
   Chose the second term according to taste: unique identifier costs you
a mount-time mapping and allows references to unmounted filesystems, mount
point costs you space to represent it (another triple?) and a lookup iff
dismounted. Mount points save a lookup at runtime.  Of course, one can use
a uid when dismounted and a pointer if mounted and try to pull them from
the same address space (:-)).

--dave
[ps: I once wrote code that depended on writing ascii text into
	Berzerkly symlinks.  Text like "file 881543 on tape NX2307".]
-- 
David Collier-Brown,  | davecb at Nexus.YorkU.CA, ...!yunexus!davecb or
72 Abitibi Ave.,      | {toronto area...}lethe!dave 
Willowdale, Ontario,  | "And the next 8 man-months came up like
CANADA. 416-223-8968  |   thunder across the bay" --david kipling



More information about the Comp.unix mailing list