All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Pollard <jesse@cats-chateau.net>
To: "Richard B. Johnson" <root@chaos.analogic.com>,
	Stephan von Krawczynski <skraw@ithnet.com>
Cc: aebr@win.tue.nl, linux-kernel@vger.kernel.org
Subject: Re: FS: hardlinks on directories
Date: Mon, 4 Aug 2003 16:23:42 -0500	[thread overview]
Message-ID: <03080416234202.04444@tabby> (raw)
In-Reply-To: <Pine.LNX.4.53.0308041142520.802@chaos>

On Monday 04 August 2003 10:57, Richard B. Johnson wrote:
> On Mon, 4 Aug 2003, Stephan von Krawczynski wrote:
> > On Mon, 4 Aug 2003 09:33:44 -0500
> >
> > Jesse Pollard <jesse@cats-chateau.net> wrote:
> > > Find for one. Any application that must scan the tree in a search. Any
> > > application that must backup every file for another (I know, dump
> > > bypasses the filesystem to make backups, tar doesn't).
> >
> > All that can handle symlinks already have the same problem nowadays.
> > Where is the difference? And yet again: it is no _must_ for the feature
> > to use it for creating complete loops inside your fs.
> > You _can_ as well dd if=/dev/zero of=/dev/hda, but of course you
> > shouldn't. Have you therefore deleted dd from your bin ?
> >
> > > It introduces too many unique problems to be easily handled. That is
> > > why symbolic links actually work. Symbolic links are not hard links,
> > > therefore they are not processed as part of the tree. and do not cause
> > > loops.
> >
> > tar --dereference loops on symlinks _today_, to name an example.
> > All you have to do is to provide a way to find out if a directory is a
> > hardlink, nothing more. And that should be easy.
>
> [SNIPPED...]
>
> Reading Denis Howe's  Free Online Dictionary of Computing;
> http://burks.bton.ac.uk/burks/foldoc/55/51.html, we see that
> the chief reason for no directory hard-links is that `rm`
> and `rmdir` won't allow you to delete them. There is no
> POSIX requirement for eliminating them, and it is possible
> "Some systems provide link and unlink commands which give
> direct access to the system calls of the same name, for
> which no such restrictions apply."
>
> Perhaps Linux does support hard-links to directories?
>
> mkdir("foo", 0644)                      = 0
> link("foo", "bar")                      = -1 EPERM (Operation not
> permitted) _exit(0)                                = ?
>
> Nah... No such luck. I'll bet it's artificial. I think you
> could remove that S_IFDIR check and get away with it!

Nope -- what you get is a corrupted filesystem.... Usually, a lost directory
gets put in lost+found, othertimes you get a "corrupted inode", and if the
inode is cleared you then find every file that was contained in the directory
that used to be the inode, is now in lost+found.

The only place I can think of that this might not happen are those filesystems
that don't use the UNIX style tree structure.

  reply	other threads:[~2003-08-04 21:24 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-04 12:15 FS: hardlinks on directories Stephan von Krawczynski
2003-08-04 12:45 ` Måns Rullgård
2003-08-04 13:22   ` Stephan von Krawczynski
2003-08-04 13:37     ` Christian Reichert
2003-08-04 13:44       ` Stephan von Krawczynski
2003-08-04 14:22         ` Christian Reichert
2003-08-04 15:31     ` Jeff Muizelaar
2003-08-04 16:15       ` Stephan von Krawczynski
2003-08-05  2:45         ` Neil Brown
2003-08-05  9:41           ` Stephan von Krawczynski
2003-08-06  1:12             ` Neil Brown
2003-08-06 10:14               ` Stephan von Krawczynski
2003-08-07  2:27                 ` Neil Brown
2003-08-04 12:47 ` Nikita Danilov
2003-08-04 13:32   ` Stephan von Krawczynski
2003-08-04 13:44 ` Andries Brouwer
2003-08-04 13:56   ` Stephan von Krawczynski
2003-08-04 14:04     ` Anton Altaparmakov
2003-08-04 14:50       ` Stephan von Krawczynski
2003-08-04 20:03         ` Olivier Galibert
2003-08-04 21:16         ` Jesse Pollard
2003-08-04 23:34           ` Stephan von Krawczynski
2003-08-05 14:20             ` Jesse Pollard
2003-08-05 14:44               ` Stephan von Krawczynski
2003-08-04 22:58         ` Andrew Pimlott
2003-08-05  0:19           ` Stephan von Krawczynski
2003-08-05  1:18             ` Andrew Pimlott
2003-08-05  8:04               ` Stephan von Krawczynski
2003-08-05 11:18                 ` Wakko Warner
2003-08-04 14:33     ` Jesse Pollard
2003-08-04 15:05       ` Stephan von Krawczynski
2003-08-04 15:57         ` Richard B. Johnson
2003-08-04 21:23           ` Jesse Pollard [this message]
2003-08-04 16:11         ` Adam Sampson
2003-08-04 17:00         ` Hans Reiser
2003-08-04 17:18           ` Sean Neakums
2003-08-05  4:53           ` jw schultz
2003-08-04 18:50         ` jlnance
2003-08-04 21:09         ` Jesse Pollard
2003-08-04 22:13           ` Stephan von Krawczynski
2003-08-04 22:32           ` Stephan von Krawczynski
2003-08-04 23:00             ` Randolph Bentson
2003-08-05  0:10               ` Stephan von Krawczynski
2003-08-05  2:09                 ` Edgar Toernig
2003-08-05  8:05                   ` Stephan von Krawczynski
2003-08-05 12:51             ` Helge Hafting
2003-08-05 13:03               ` Stephan von Krawczynski
2003-08-05 13:13                 ` Bernd Petrovitsch
2003-08-05 13:39                   ` Stephan von Krawczynski
2003-08-05 13:36                 ` Richard B. Johnson
2003-08-05 14:04                   ` Stephan von Krawczynski
2003-08-05 14:57                     ` Richard B. Johnson
2003-08-05 15:08                       ` Stephan von Krawczynski
2003-08-05 15:02                     ` Jesse Pollard
2003-08-05 15:12                       ` Stephan von Krawczynski
2003-08-05 15:44                       ` Trond Myklebust
2003-08-05 14:56                   ` Jesse Pollard
2003-08-05 22:08                 ` Helge Hafting
2003-08-24 17:35                   ` Hans Reiser
2003-08-24 19:02                     ` Helge Hafting
2003-08-24 19:15                     ` Alexander G. M. Smith
2003-08-25  8:27                     ` Nikita Danilov
2003-08-25 15:48                       ` Hans Reiser
2003-08-05 14:12             ` Jesse Pollard
2003-08-05 14:21               ` Stephan von Krawczynski
2003-08-05 15:53                 ` Herbert Pötzl
2003-08-04 20:47     ` Jan Harkes
2003-08-04 15:42   ` Brian Pawlowski
2003-08-04 15:56     ` Stephan von Krawczynski
2003-08-04 16:16       ` Herbert Pötzl
2003-08-04 16:35         ` Stephan von Krawczynski
2003-08-04 16:54           ` Herbert Pötzl
2003-08-04 17:18             ` Stephan von Krawczynski
2003-08-04 17:25               ` Herbert Pötzl
2003-08-04 21:38           ` Jesse Pollard
2003-08-05  0:06             ` Stephan von Krawczynski
2003-08-05  3:11           ` Neil Brown
2003-08-04 21:29       ` Jesse Pollard
2003-08-04 23:42         ` Stephan von Krawczynski
2003-08-05 16:46           ` viro

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=03080416234202.04444@tabby \
    --to=jesse@cats-chateau.net \
    --cc=aebr@win.tue.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    --cc=skraw@ithnet.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.