[COFF] [TUHS] Re: History of cal(1)?

Arnold Robbins via COFF coff at tuhs.org
Sat Sep 27 00:51:20 AEST 2025


Dan Cross via TUHS <tuhs at tuhs.org> wrote:

> A random thought: some versions of UFS have support for something they
> call "fast symlinks".  Symbolic links, of course, are just files that
> contain a string naming some other file, and if a pathname has a
> component naming a symlink when walked by `namei`, that string is
> substituted for the name of the symlink.  But often these names are
> very short, and recall that the `inode` contains some space for disk
> block addresses (60 bytes in UFS on 4.1C, but this got bigger in later
> versions).  The idea with fast symlinks is that, if the target file
> name of a symlink is short enough, the system can just store it in the
> space that would normally be used for block addresses; there's no need
> to allocate a separate fragment from a disk block, let alone bear the
> cost of allocating a buffer and fetching a block from disk, if a short
> name can be written directly into the inode.
>
> I don't think anyone ever gave serious thought to generalizing this
> facility for very small files, but in principle, one could store their
> contents in a similar manner (think of all those random little files
> that just have a pid in them or something).

I recall hearing that Amdahl did this for UTS, their System V port.
I think it was a little more general, in that if there were, say 2
inodes in a 512-byte block, a file of size (256 - sizeof(struct inode))
could be stored in the same block as the inode itself.

FWIW,

Arnold


More information about the COFF mailing list