All of lore.kernel.org
 help / color / mirror / Atom feed
From: David van Hoose <david.vanhoose@comcast.net>
To: Helge Hafting <helge.hafting@hist.no>
Cc: John Richard Moser <nigelenki@comcast.net>, linux-kernel@vger.kernel.org
Subject: Re: Collapse ext2 and 3 please
Date: Fri, 25 Jun 2004 07:30:40 -0400	[thread overview]
Message-ID: <40DC0CE0.6040509@comcast.net> (raw)
In-Reply-To: <40DBED77.6090704@hist.no>

If ext2 and ext3 are different filesystems, why does my kernel panic if 
I include ext3 in the kernel make ext2 a module?

Regards,
David

Helge Hafting wrote:
> John Richard Moser wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I know this has been mentioned before, or at least I *hope* it has.
>>
> Take a look at history.  Linus said that creating a journalled fs was
> fine, but they had to make it a new fs so as to not make ext2 unstable
> while working on it.  Therefore - ext3.  Now ext3 was based on ext2
> so it basically started out as a copy.
> 
>> ext2 and ext3 are essentially the same, aren't they?  I'm looking at a
>> diff, and other than ext2->ext3, I'm seeing things like:
>>
>> - -              mark_inode_dirty(inode);
>> +              ext3_mark_inode_dirty(handle, inode);
>>
>> and thinking
>>
>> - -              mark_inode_dirty(inode);
>> +#ifdef CONFIG_EXT2_JOURNALED
>> +              if (fs->journaled)
>> +                 extjnl_mark_inode_dirty(handle, inode);
>> +              else
>> +#endif
>> +                 mark_inode_dirty(inode);
>>
>> would have been so much more appropriate.  
> 
> 
> No, because:
> 1. Code withg lots of #ifdefs isn't popular here.  So don't suggest it,
>    because no argument will win this one.
> 2. Did it ever occur to you that some people want to support both
>    ext2 and ext3 with the same kernel.  Impossible with your scheme,
>    and don't say "nobody needs that".
> 3. ext3 may evolve differently from ext2 with time.  Common code
>    makes people do things in suboptimal ways in order to keep
>    commonality.  There is _no_ commonality pressure when the
>    sources are separate.  ext3 developers are free to change their
>    code in ways that could break operation of the non-journalling ext2.
>    And vice-versa- ext2 is free do use ordering optimizations incompatible
>    with journalling.
> 4. "Appropriate" doesn't matter.  Readability and maintainability does.
> 5. Linus demanded two fs'es in this case, so there is no discussion.
> 
>> I see entire functions that
>> are dropped and added; the dropped can stay, the added can be added,
>> they can be used conditionally.  I also see mostly code that just was
>> copied verbatim, or was s/EXT2/EXT3/ or s/ext2/ext3/ .  That's just not
>> appropriate.
> 
> 
> This is not much of a problem - a few kB wasted on keeping some
> identical copies of code.  You might be able to establish a
> ext23_common.c, _if_ you can prove that the stuff therein really
> won't ever be different in ext2 and ext3.
> 
> 
>>
>> The ext2 driver can even load up ext3 partitions without using the
>> journal, if it still behaves like it did in 2.4.20.  I say collapse them
>> in on eachother.
> 
> 
> This was very useful during initial development, when ext3 couldn't
> really be trusted.  It is still useful because it allows easy conversion
> of existing filesystems, and a single fsck. Compatibility might break 
> someday though.
> The fs code may take very different approaches with time anyway,
> even if the disk layout remains compatible.
> Helge Hafting

  reply	other threads:[~2004-06-25 11:30 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-24 23:14 Collapse ext2 and 3 please John Richard Moser
2004-06-25  9:16 ` Helge Hafting
2004-06-25 11:30   ` David van Hoose [this message]
2004-06-25 11:41     ` Christoph Hellwig
2004-06-25 11:50       ` David van Hoose
2004-06-25 12:01         ` Matthew Garrett
     [not found]         ` <1088165028.16286.59.camel@imp.csi.cam.ac.uk>
2004-06-25 12:05           ` David van Hoose
2004-06-25 12:13             ` Matthew Garrett
     [not found]             ` <1088165426.16286.67.camel@imp.csi.cam.ac.uk>
2004-06-25 12:18               ` David van Hoose
2004-06-25 13:03                 ` Tigran Aivazian
2004-06-25 12:40                   ` David van Hoose
2004-06-25 14:03                 ` Rik van Riel
2004-06-25 12:10         ` Christoph Hellwig
2004-06-25 12:15           ` David van Hoose
2004-06-25 12:26         ` Richard B. Johnson
2004-06-25 12:48         ` Philip R. Auld
2004-06-25 12:53           ` David van Hoose
2004-06-25 13:39             ` Tigran Aivazian
2004-06-25 18:55               ` David van Hoose
2004-06-25 22:26   ` John Richard Moser
2004-06-25 12:25 ` Sean Neakums
2004-06-25 18:01   ` Timothy Miller
2004-06-25 18:04     ` Sean Neakums
2004-06-25 18:41       ` Timothy Miller
2004-06-25 20:52         ` R. J. Wysocki
2004-06-25 20:50           ` Sean Neakums
2004-06-25 21:36             ` R. J. Wysocki
2004-06-25 22:00   ` Andrew Morton
2004-06-25 23:48     ` John Richard Moser
     [not found] <2aZfF-3es-5@gated-at.bofh.it>
     [not found] ` <2b45V-6tl-39@gated-at.bofh.it>
2004-06-25 22:28   ` Pascal Schmidt

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=40DC0CE0.6040509@comcast.net \
    --to=david.vanhoose@comcast.net \
    --cc=helge.hafting@hist.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nigelenki@comcast.net \
    /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.