All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander G. M. Smith" <agmsmith@rogers.com>
To: John Gilmore <jgilmore@glycou.com>
Cc: reiserfs-list@namesys.com
Subject: Re: Our introduction to Reiser-list
Date: Thu, 27 Oct 2005 08:05:02 -0400 EDT	[thread overview]
Message-ID: <34286000544-BeMail@AlexDualP3> (raw)
In-Reply-To: <200510261702.06844.jgilmore@glycou.com>

John Gilmore wrote on Wed, 26 Oct 2005 17:02:06 +0000:
> I had understood that a big part of the issue with file-as-directory was the 
> same as the issue with hard links to directories. Which I thought is that if 
> you move one directory into another, you can lose the connection to the root 
> of the filesystem -- I.E. ../../.. etc is no longer guaranteed to get you 
> to / -- And of course this also means that there is no way to get from / to 
> your freshly moved files, and you've just lost a chunk of disk space to 
> complete inaccessibility. fsck would have to be made smarter specifically to 
> be able to figure that one out, too.

The file move operation has to check that it doesn't break the graph into
two graphs, thus disconnecting some files from the root.  Or you can think
of it as being a way of deleting a whole subgraph of files all at once,
kind of like an rmdir that works better than usual :-)

Speaking of connecting to the root, one concept I found useful was to have
a "True Path" to the root.  One of the hard links to a file / directory is
considered to be the main one and the rest are auxiliary (easier done if
each file/dir stores a list of parents).  The main one is guaranteed to
lead to the root (a recursive property) and is used for ".." in directories
and the equivalent operation for files.  Then when you want a canonical
path, you build it by following the main parents up to the root.

The "True Path" comes in useful for faking hard links for POSIX compatibility
by misrepresenting them as symbolic links using the dynamically generated true
path string.  As well, if you remove a hard link and it wasn't the main parent
then you don't have to do any graph traversal to fix up things; all items
will still have a valid link to the root through their unchanged main parent.

- Alex

  parent reply	other threads:[~2005-10-27 12:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 22:58 Our introduction to Reiser-list Peter van Hardenberg
2005-10-25 23:08 ` Hans Reiser
2005-10-26  0:04   ` Peter van Hardenberg
2005-10-26  2:42     ` Hubert Chan
2005-10-26 12:44       ` Peter Foldiak
2005-10-26 16:10         ` Peter van Hardenberg
2005-10-26 16:43           ` Chester R. Hosey
2005-10-26 17:12             ` Hans Reiser
2005-10-26 20:43             ` David Masover
2005-10-26 22:40             ` Nate Diller
2005-10-26 17:02               ` John Gilmore
2005-10-27  0:55                 ` Hubert Chan
2005-10-27  6:49                 ` Peter van Hardenberg
2005-10-27 11:17                   ` David Masover
2005-10-27 19:20                     ` Peter van Hardenberg
2005-10-27 20:44                       ` Jonathan Briggs
2005-10-27  8:44                 ` Hans Reiser
2005-10-27 12:05                 ` Alexander G. M. Smith [this message]
2005-10-27 12:41                   ` John Gilmore
2005-10-28 12:29                     ` Alexander G. M. Smith
2005-10-27 16:40                   ` Hans Reiser
2005-10-26 21:04           ` Nate Diller
2005-10-26 21:09             ` Hans Reiser
2005-10-26 21:00 ` Lares Moreau

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=34286000544-BeMail@AlexDualP3 \
    --to=agmsmith@rogers.com \
    --cc=jgilmore@glycou.com \
    --cc=reiserfs-list@namesys.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.