This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Should hard links to directories work?

Rutger Hofman <> writes:

> sandeep wrote:
> > Hi Ross,
> > Younger ;) people often have interesting questions and are
> > responsible for fresh insights.
> >
> >> The Unix world traditionally shuns such things as an abomination.
> >> The eCos docs are quiet on the subject, as is the code in
> >> ramfs and jffs2.
> >> Should they work? Does anybody use them?
> > Before we discuss it further, where/how do you think you will use
> > directory hardlinking, if it were available for normal user?
> FWIW, the Amoeba distributed OS had hard links to directories. It had
> no soft links at all. It introduces loops in the directory 'hierarchy'
> (because of the loops, there is no hierarchy any more), so
> e.g. find(1) had to be armed with loop detection.

Although, as a capability based operating system, hard links, in the
form of saved capabilities, were an essential feature of Amoeba to
confer and control access within the filesystem.

The main capability operating system I used (Chaos on the Cambridge
CAP machine) also implemented a directed graph filesystem. This
required a garbage collector to be run on it regularly to clean up
detached cycles. This is also why directory hard links are generally
not permitted, since detached cycles are hard to remove.

In eCos, support for hard directory links should generally be a
filesystem property. If a particular filesystem can deal with the
consequences the they should be passed through the other layers
without comment. For YAFFS, I suspect that they should not be

Nick Garnett                                       eCos Kernel Architect
eCosCentric Limited       The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales:                         Reg No: 4422071

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]