Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Mar 2000 03:41:17 -0800
From:      David Greenman <dg@root.com>
To:        "Lin Gu" <lingu@fudan.edu>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: cannot hard link point to directory? 
Message-ID:  <200003151141.DAA07398@implode.root.com>
In-Reply-To: Your message of "Wed, 15 Mar 2000 17:10:25 %2B0800." <08da01bf8e5e$5f770990$19b769a2@shawshank> 

next in thread | previous in thread | raw e-mail | index | archive | help
>I'm confused why hard link cannot point to directory. It can just point to
>the inode of the directory file, i suppose.

   ...a completely different question than the problems that were being
discussed, but I'll try to answer. The problem with hard directory links is
that there isn't any [easy/inexpensive] way to detect filesystem recursion
(i.e. when a link points upward in the path). Also, due to characteristics
of the FFS filesystem, the system really wants to have only one parent
directory pointer (especially the case in crash recovery); a directory hard
link makes that not the case any longer.

-DG

David Greenman
Co-founder/Principal Architect, The FreeBSD Project - http://www.freebsd.org
Creator of high-performance Internet servers - http://www.terasolutions.com
Pave the road of life with opportunities.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003151141.DAA07398>