From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7988 invoked by alias); 20 May 2009 16:35:22 -0000 Received: (qmail 7968 invoked by uid 22791); 20 May 2009 16:35:20 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from anchor-post-2.mail.demon.net (HELO anchor-post-2.mail.demon.net) (195.173.77.133) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 May 2009 16:35:13 +0000 Received: from calivar.demon.co.uk ([83.104.54.243] helo=xl5.calivar.com) by anchor-post-2.mail.demon.net with esmtp (Exim 4.69) id 1M6ol4-0006tU-lB; Wed, 20 May 2009 16:35:10 +0000 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id 3F3A01386E9; Wed, 20 May 2009 17:35:09 +0100 (BST) To: Rutger Hofman Cc: "ecos-devel@ecos.sourceware.org" , Ross Younger Subject: Re: Should hard links to directories work? References: <442798.53859.qm@web112517.mail.gq1.yahoo.com> <4A142A3A.9010006@cs.vu.nl> From: Nick Garnett Original-Sender: nickg@ecoscentric.com Date: Wed, 20 May 2009 16:35:00 -0000 In-Reply-To: <4A142A3A.9010006@cs.vu.nl> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2009-05/txt/msg00064.txt.bz2 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 permitted. -- 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