mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugo Mills <hugo-lkml@carfax.org.uk>
To: rmoser <mlmoser@comcast.net>
Cc: viro@parcelfarce.linux.theplanet.co.uk, linux-kernel@vger.kernel.org
Subject: Re: File System conversion -- ideas
Date: Sun, 29 Jun 2003 21:50:03 +0100	[thread overview]
Message-ID: <20030629205003.GA4298@carfax.org.uk> (raw)
In-Reply-To: <200306291629450990.023BC35E@smtp.comcast.net>

[-- Attachment #1: Type: text/plain, Size: 4500 bytes --]

On Sun, Jun 29, 2003 at 04:29:45PM -0400, rmoser wrote:
> *********** REPLY SEPARATOR  ***********
> 
> NO!  You're not getting the point at all!
> 
> You don't need a pair!  If you have 10 filesystems, you need 10 sets of
> code in each direction, not 90.  You convert from the data/metadata set
> in the first filesystem to a self-contained atom, and then back from the
> atom to the data/metadata set in the new filesystem.  The atom is object
> oriented, so anything that can't be moved over--like ACLs or Reiser4's
> extended attributes that nobody else has, or permissions if converting to
> vfat--is just lost.  

   You will, of course, ensure that your atoms contain the superset of
all filesystem metadata semantics.

> Note that if the data has an attribute like "Compressed"
> or "encrypted", it is expanded/decrypted and thus brought back to its
> natural form before being stuffed into an atom.
[snip]

> So with 10 filesystem types, N*(N-1) or 90 pairs to go directly from one
> filesystem's datastructures to any other's; N*2 or 20 pairs to go from
> Metadata/Data pair -> Self-contained object oriented possibly
> compressed atom -> Metadata/Data pair.  That's N sets of code to go
> FS_OBJECT -> atom and N sets to go from atom ->  FS_OBJECT, in
> this case 10 and 10.
> 
> When we get to 20 filesystems, direct conversion needs 380 pieces of
> code, whereas my method needs only 20 + 20 == 40.  I obviously put
> more thought into this than you, but that's okay; it's an obscure idea and
> I don't expect everyone to think before answering.

   Actually:

1) I think Viro did mention exactly this method in one of his mails.

2) It's not an obscure idea at all -- it's one of the standard
   techniques if you've ever had to consider (let alone write!) a
   set of data-conversion routines.

> >If you want your idea to be considered seriously - take reiserfs code,
> >take ext3 code, copy both to userland and put together a conversion
> >between them.  Both ways.  That, by definition, is easier than doing
> >it in kernel - you have the same code available and none of the
> >limitations/
> >interaction with other stuff.  When you have it working, well, time to
> >see what extra PITA will come from making it coexist with other parts
> >of kernel (and with much more poor runtime environment).
> >
> 
> That would be much harder to maintain as well.  It would have to be altered
> every time the filesystem code in the kernel is changed.

   Yes, but the point is it's a much easier thing to implement and
test the concept than diving straight into kernel code. You don't have
to maintain it for very long (if at all) -- just long enough to prove
to everyone that this kind of conversion is possible, and that they
should help you roll it into the kernel.

> >AFAICS, it is _very_ hard to implement.  Even outside of the kernel.
> >If you can get it done - well, that might do a lot for having the
> >idea considered seriously.  "Might" since you need to do it in a way
> >that would survive transplantation into the kernel _and_ would scale
> >better that O((number of filesystem types)^2).
> 
> I've beaten the O((FS_COUNT)^2) already.  And by the way, it's
> O((FS_COUNT)*(FS_COUNT - 1_).  There's exactly O(2*FS_COUNT)
> and o(2*FS_COUNT) sets of code needed total to be able to convert
> between any two filesystems.

   There's no such thing as O(x*(x-1)). This is precisely O(x^2).
Similarly, O(2*x) is precisely the same as O(x). If you're going to
try to use mathematics to demonstrate your point, please at least make
sure that you're using it _right_.

> Now, what's impractical is maintaining two sets of code that do exactly
> the same thing.  Why maintain code here to read the filesystems, and
> also in the kernel?  

   It's not a maintenance thing at all -- it's a matter of
demonstrating that you can walk before you try running.

> Just do it in the kernel.  Don't lose sight of the fact
> that the final goal (after all else is done) is to modify VFS to actually
> run this thing as a filesystem.  THAT is what's going to be a bitch.  The
> conversions are simple enough.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 1C335860 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
     --- For months now, we have been making triumphant retreats ---     
               before a demoralised enemy who is advancing               
                           in utter disorder.                            

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2003-06-29 20:36 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 [this message]
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
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=20030629205003.GA4298@carfax.org.uk \
    --to=hugo-lkml@carfax.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlmoser@comcast.net \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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®