linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vernon Mauery <vernux@us.ibm.com>
To: "Horst H. von Brand" <vonbrand@inf.utfsm.cl>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: what is necessary for directory hard links
Date: Sun, 23 Jul 2006 15:27:23 -0700	[thread overview]
Message-ID: <200607231527.23484.vernux@us.ibm.com> (raw)
In-Reply-To: <200607230219.k6N2JMHI021999@laptop13.inf.utfsm.cl>

On Saturday 22 July 2006 19:19, you wrote:
> Bodo Eggert <7eggert@elstempel.de> wrote:
> > Horst H. von Brand <vonbrand@inf.utfsm.cl> wrote:
> > > Joshua Hudson <joshudson@gmail.com> wrote:
> > >> This patch is the sum total of all that I had to change in the kernel
> > >> VFS layer to support hard links to directories
> > >
> > > Can't be done, as it creates the possibility of loops.
> >
> > Don't do that then?
>
> Stop /everything/ to make sure no concurrent activity creates a loop, while
> checking the current mkdir(2) doesn't create one?

This doesn't seem that big of an issue for people to be up in arms about.  You 
wouldn't have to stop /everything/, would you, just have an in kernel mutex 
in vfs_mkdir.  It's not the most commonly used system call in the book -- 
meaning serializing the checking/creating of new directories would not really 
hamper your system /that/ much.

Personally, I don't think hard linked directories are necessary or even that 
interesting, but they certainly aren't impossible to do.  I suppose there 
might be some specialty filesystem that might like to do hardlinked 
directories and I don't think the vfs core should make it difficult.  

--Vernon

> > > The "only files can
> > > be hardlinked" idea makes garbage collection (== deleting of
> > > unreachable objects) simple: Just check the number of references.
> > >
> > > Detecting unconnected subgraphs uses a /lot/ of memory; and much worse,
> > > you have to stop (almost) all filesystem activity while doing it.
> >
> > In order to disconnect a directory, you'd have to empty it first, and
> > after emptying a directory, it won't be part of a loop. Maybe emtying is
> > the problem ...
>
> What does "emptying a directory" mean if there might be loops?
>
> > This feature was implemented,
>
> Never in my memory of any Unix (and lookalike) system in real use (I've
> seen a few).
>
> >                               and I asume it was removed for a reason.
> > Can somebody remember?
>
> See my objections.

  reply	other threads:[~2006-07-23 22:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6ARGK-19L-5@gated-at.bofh.it>
     [not found] ` <6B8og-1iB-17@gated-at.bofh.it>
2006-07-22 16:59   ` what is necessary for directory hard links Bodo Eggert
2006-07-22 18:13     ` Joshua Hudson
2006-07-24  6:45       ` Nikita Danilov
2006-07-24  7:25         ` Valdis.Kletnieks
2006-07-24 16:21           ` Joshua Hudson
2006-07-24 17:55             ` Horst H. von Brand
2006-07-24 18:22             ` Valdis.Kletnieks
2006-07-25  4:49               ` Joshua Hudson
2006-07-25 12:43                 ` Valdis.Kletnieks
2006-07-25 14:47                 ` Horst H. von Brand
2006-07-23  2:19     ` Horst H. von Brand
2006-07-23 22:27       ` Vernon Mauery [this message]
2006-07-25 23:43       ` Peter Chubb
     [not found] <6CcT1-1lH-39@gated-at.bofh.it>
     [not found] ` <6Cwov-5xl-5@gated-at.bofh.it>
2006-07-25 21:28   ` Bodo Eggert
2006-07-26  1:00     ` Horst H. von Brand
2006-07-26  9:13       ` Bodo Eggert
2006-07-21  1:04 Joshua Hudson
2006-07-21 18:49 ` Horst H. von Brand
2006-07-21 20:28 ` Rob Sims
2006-07-21 21:57   ` Joshua Hudson
2006-07-24  6:42     ` Nikita Danilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607231527.23484.vernux@us.ibm.com \
    --to=vernux@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vonbrand@inf.utfsm.cl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).