This is the mail archive of the
mailing list for the eCos project.
Re: Should hard links to directories work?
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: Rutger Hofman <rutger at cs dot vu dot nl>
- Cc: "ecos-devel at ecos dot sourceware dot org" <ecos-devel at ecos dot sourceware dot org>, Ross Younger <wry at ecoscentric dot com>
- Date: 20 May 2009 17:35:08 +0100
- Subject: Re: Should hard links to directories work?
- References: <email@example.com> <4A142A3A.firstname.lastname@example.org>
Rutger Hofman <email@example.com> 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 http://www.eCosCentric.com The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No: 4422071