mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: rmoser <mlmoser@comcast.net>
To: Richard Braakman <dark@xs4all.nl>, linux-kernel@vger.kernel.org
Subject: Re: File System conversion -- ideas
Date: Sun, 29 Jun 2003 20:58:00 -0400	[thread overview]
Message-ID: <200306292058000590.0331625D@smtp.comcast.net> (raw)
In-Reply-To: <20030630000508.GA3657@cs78143044.pp.htv.fi>



*********** REPLY SEPARATOR  ***********

On 6/30/2003 at 3:05 AM Richard Braakman wrote:

>On Sun, Jun 29, 2003 at 04:36:15PM -0400, rmoser wrote:
>> Told you, I can't code it.  I could work on making an initial design for
>the
>> most important part though, the datasystem that separates the two
>filesystems
>> and holds the meta-data and data in self-contained atoms.  I KNOW I won't
>> get it right the first time, but I can give you a place to start.
>
>I don't think that's the most important part.  The most important part
>is figuring out a layout for the filesystem while it's in transition,
>such that it is at the same time a valid ext3 filesystem (so that the
>ext3 export routines can work on it) and a valid reiser4 filesystem
>(so that the reiser4 import routines can work on it).  And you need
>to do it in such a way that the import routines won't stomp on data
>that hasn't been exported yet.
>

Nerg.  Filesystem isn't exactly readable while it's being disassembled.
Well, I'd leave everything in place for inodes that are there, but entries in
the inode table are slowly being removed.  The idea is that you keep what
you need to get to valid, and the hell with what you're done with.  For
example, once I've drained all data out of the superblock and categorized
it so that I can pass it to functions to deal with the orginal fs (OFS), you can
destroy the superblock on-disk, and just make logical copies of it in RAM
whenever it needbe referenced (just like buffering, before it's flushed to disk
the buffer is read for the changed data).

By the same token, once you grab all data and meta-data for an Inode and
place it into an atom, you're'm done with that inode and it's data.  You won't
be reading it again and you will NOT be writing to the OFS again.  Poof, free'd.
That space belongs to the converter datasystem.

Note that the inode table is now invalid.  Still, you can mark what I've taken
apart already down, and point out where to start.  The OFS driver will of
course have given you a chunk of all the important information from the
superblock and whatever else it needs to locate any given inode by index,
which it'll be querying when you tell it to get the NEXT inode.  Of course you
extract that inode, and you have exactly what you need to locate the data
belonging to it and pack it into another atom.

By the same token, you can probably start off with a valid filesystem for
your TFS (Target FS), by spewing out a superblock and a fresh, empty
Inode table that you fill in slowly.

Now I'm working on this upstairs, and I've run into the directory issue.
You know, the inode numbers change as you go along.  There's a way
to deal with that too.  Three ways actually.

-- Hold directories off until last.  As you rewrite inodes, you scan the
directory atoms and find the pointers to the original inode numbers.
Then change them to whatever the hell they changed to.

-- Inform the TFS of the original inode index for each inode as you send
it, and let it rewrite the directories

-- Make sure inodes match up

The last one is stupid.  It may not be possible, or may just not work.
It requires copying deleted inodes too.

The second one is an admirable attempt, but still stupid:  You have to
do a whole scan every time an inode is written to the TFS.

That first one is great.  It puts all directories at the end of the TFS, true.
but they're all together, interestingly enough.  Also, it lets the CDS
(Conversion DataSystem) control how these are indexed, which allows
universal optimization by rewriting the CDS' code.

>If you don't have that, then there's no point in putting it in the
>kernel because you won't be able to re-use the kernel fs code anyway.
>

Some of it has to be rewritten.

>Then you need to generalize this to work with any pair of filesystems.
>

Done.

>As for the datasystem to hold the metadata: I expect you'll find that
>backup/restore systems already implement this.  It's what they have to
>do, after all.
>

NOT in place they don't!

>Richard Braakman
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/




  reply	other threads:[~2003-06-30  0:44 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-29 10:11 John Bradford
2003-06-29 13:28 ` Jamie Lokier
2003-06-29 13:50   ` David D. Hagood
2003-06-29 18:31     ` rmoser
2003-06-29 19:55       ` David D. Hagood
2003-06-29 20:05         ` rmoser
2003-06-29 20:41           ` David D. Hagood
2003-06-29 20:53             ` rmoser
2003-06-29 20:22         ` Leonard Milcin Jr.
2003-06-30 16:05     ` Henning P. Schmiedehausen
2003-06-30 16:59       ` Leonard Milcin Jr.
2003-06-30 17:04         ` Kevin Corry
2003-06-30 17:37         ` Valdis.Kletnieks
2003-07-01  9:56       ` Stewart Smith
2003-06-29 13:54   ` Leonard Milcin Jr.
2003-06-29 18:45     ` rmoser
2003-06-29 19:37       ` Leonard Milcin Jr.
2003-06-29 19:43         ` Leonard Milcin Jr.
2003-06-29 19:48           ` rmoser
2003-06-30  3:52             ` Horst von Brand
2003-07-01 10:15             ` Stewart Smith
2003-07-01 14:55               ` Leonard Milcin Jr.
2003-07-01 15:41                 ` Stewart Smith
2003-07-01 16:19                   ` Leonard Milcin Jr.
2003-06-29 19:44         ` rmoser
2003-06-29 19:44         ` Jamie Lokier
2003-06-29 19:46           ` rmoser
2003-06-29 20:02           ` viro
2003-06-29 20:26             ` Leonard Milcin Jr.
2003-06-29 20:31             ` rmoser
2003-07-01 10:01         ` Stewart Smith
2003-06-29 19:28     ` Jamie Lokier
2003-06-29 19:35       ` rmoser
2003-06-29 19:42       ` viro
2003-06-29 19:45         ` rmoser
2003-06-29 20:00           ` viro
2003-06-29 20:19             ` Davide Libenzi
2003-06-29 20:25               ` viro
2003-06-29 20:45                 ` rmoser
2003-06-29 20:46                 ` Davide Libenzi
2003-06-30  9:13                 ` Nikita Danilov
2003-06-29 20:38               ` rmoser
2003-06-29 20:29             ` rmoser
2003-06-29 20:50               ` Hugo Mills
2003-06-29 21:00                 ` rmoser
2003-06-29 21:10                   ` Davide Libenzi
2003-06-29 21:37                   ` Hugo Mills
2003-06-29 21:54                     ` rmoser
2003-06-29 22:25                       ` Hugo Mills
2003-06-29 20:51               ` viro
2003-06-29 21:07                 ` rmoser
2003-06-29 21:08                 ` Chris Friesen
2003-06-30  0:25               ` Jan Harkes
2003-06-30  0:59                 ` rmoser
2003-07-01 20:03             ` Pavel Machek
2003-07-02 14:49               ` Jan Kara
2003-06-29 20:05           ` David D. Hagood
2003-06-29 20:36             ` rmoser
2003-06-30  0:05               ` Richard Braakman
2003-06-30  0:58                 ` rmoser [this message]
2003-06-29 21:32           ` Diego Calleja García
2003-06-30 13:26           ` Jesse Pollard
2003-06-30 13:42             ` Hans Reiser
2003-06-30 13:56               ` Jesse Pollard
2003-07-06 19:30             ` Svein Ove Aas
2003-06-29 18:26 ` rmoser
  -- strict thread matches above, loose matches on Subject: below --
2003-07-07  8:43 John Bradford
2003-07-01 16:04 Matt Reuther
2003-07-01 16:13 ` Frank Gevaerts
2003-06-30 14:11 John Bradford
2003-06-30 15:45 ` Leonard Milcin Jr.
2003-06-30  8:55 John Bradford
2003-06-30  9:36 ` Hans Reiser
2003-06-30 16:29   ` viro
2003-06-29 21:59 John Bradford
2003-06-29 20:20 John Bradford
2003-06-29 20:44 ` rmoser
2003-06-29 20:06 John Bradford
2003-06-29 18:58 John Bradford
2003-06-29 19:12 ` rmoser
2003-06-29 18:37 John Bradford
2003-06-29 18:48 ` rmoser
2003-06-29 19:42 ` Jamie Lokier
2003-06-29 16:24 John Bradford
2003-06-29 16:13 John Bradford
2003-06-29 19:16 ` Jamie Lokier
2003-06-29  6:57 rmoser
2003-06-30 13:05 ` Jesse Pollard

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=200306292058000590.0331625D@smtp.comcast.net \
    --to=mlmoser@comcast.net \
    --cc=dark@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®