All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederman@lnxi.com (Eric W. Biederman)
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: Christopher Hoover <ch@murgatroid.com>,
	'Linux MTD' <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 13/22] remove erase regions
Date: 22 Dec 2004 03:05:06 -0700	[thread overview]
Message-ID: <m3y8fqtzql.fsf@maxwell.lnxi.com> (raw)
In-Reply-To: <20041222085921.GA31282@wohnheim.fh-wedel.de>

Jörn Engel <joern@wohnheim.fh-wedel.de> writes:

> On Tue, 21 December 2004 19:47:00 -0700, Eric W. Biederman wrote:
> > jffs2 is only a solution on large NOR flash parts.
> 
> True.  I've been meaning to scale jffs2 down, but never found the
> time.

I keep trying to scale my flash chips up but that is non-trivial
on commodity motherboards :)

Until jffs2 is an effective solution on the very small flash
parts there will be a use for variable size flash blocks.

The flash parts I typically work with are 256KiB to 1MiB.
Usually with most blocks at 64KiB, although some variants have 4KiB
blocks.

On a 4KiB flash I could probably afford to not use a spare flash block
or two.   For the common case of 64KiB I don't see how I could leave
an entire flash block unused.  Which is the very hard part of scaling
jffs2 down to the tiniest systems.

> The other way around, blockmtd.c.  Which is a cleaned up version of
> blkmtd.c.  It turns a block device into an mtd device, not vice versa.
> Name is confusing, so if you have a better one...

block2mtd ?

> Both emulations have valid uses:

Agreed.

> > > > 5 does, but is horribly ugly and noone cares enough to clean it up. 
> > 
> > If it ain't broke don't fix it.  Besides I have trouble seeing how 500 lines
> > of code can be horribly ugly.  
> 
> o read-only devices that confuse every single new user

Agreed.  The read-only devices are silly.

> o #define MAX_KMALLOC_SIZE 0x20000
> o FIXME: This _really_ needs to die. In 2.5, we should ...

I see more problems with where the code wanted to go, as indicated
by those comments than with where the code is now.  Probably
allocating a single buffer page and calling down into the mtd device
layer multiple times.  I have trouble seeing the benefit
of making it a zero copy interface.

But none of this counts as horribly ugly in my book.  Just
warts that may benefit from being cleaned up.

Some of the current IB stacks count get a lot closer to horribly ugly.
Several hundred lines of global variables in one file I count horribly
ugly.  At 500 lines I can see ugly code, but it is hard to write
something that is a disaster that is that small.  The obfuscated C
contest shows you can do it but we certainly don't have that.

> > 
> > If Christopher is reading this right I agree that killing variable
> > erase sizes across the board is a very bad idea.
> 
> He isn't.
> 
> To finally lift all the confusion:
> This is about the blockmtd driver, nothing else.  Said driver takes a
> block device and turns it into an mtd.  And for an bd-based mtd, there
> is _no_ point in having complicated erase regions.
> 
> For regular flash, I consider them to be silly as well, but there are
> so many silly things that people like.  Let them have fun, as long as
> noone gets hurt.

Agreed.

So have your fun with block2mtd and I won't worry about it.

Eric

  reply	other threads:[~2004-12-22 10:05 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-15 23:19 JFFS2 mount time Gareth Bult (Encryptec)
2004-12-16  0:15 ` Josh Boyer
2004-12-16  1:02   ` Gareth Bult (Encryptec)
2004-12-16 12:53     ` Josh Boyer
2004-12-16 21:22       ` Gareth Bult (Encryptec)
2004-12-16 21:28         ` Josh Boyer
2004-12-16 21:47           ` Gareth Bult (Encryptec)
2004-12-17 12:54             ` Josh Boyer
2004-12-17 15:33               ` Gareth Bult (Encryptec)
2004-12-17 16:02                 ` Josh Boyer
2004-12-17 16:46                   ` Gareth Bult (Encryptec)
2004-12-17 17:08                     ` Artem B. Bityuckiy
2004-12-17 17:10                     ` Josh Boyer
2004-12-17 17:26                       ` Gareth Bult (Encryptec)
2004-12-17 17:35                         ` Josh Boyer
2004-12-17 18:09                           ` Gareth Bult (Encryptec)
2004-12-17 19:14                             ` jasmine
2004-12-17 20:55                               ` Gareth Bult (Encryptec)
2004-12-18 16:02                           ` Jörn Engel
2004-12-20 16:34                             ` Josh Boyer
2004-12-20 17:12                               ` Gareth Bult (Encryptec)
2004-12-21 13:09                                 ` Jörn Engel
2004-12-21 13:24                                   ` Gareth Bult (Encryptec)
2004-12-21 13:34                                     ` Jörn Engel
2004-12-18 16:19             ` Jörn Engel
2004-12-18 17:32               ` Gareth Bult (Encryptec)
2004-12-18 17:52                 ` Jörn Engel
2004-12-18 18:11                   ` Jörn Engel
2004-12-18 20:48                     ` Gareth Bult (Encryptec)
2004-12-19  2:44                       ` Jörn Engel
2004-12-21 13:30                       ` Jörn Engel
2004-12-21 13:39                         ` [PATCH 1/22] Add drivers/mtd/devices/blockmtd.c Jörn Engel
2004-12-21 13:41                           ` [PATCH 2/22] Add copyrights Jörn Engel
2004-12-21 13:42                             ` [PATCH 3/22] Remove read-only option Jörn Engel
2004-12-21 13:44                               ` [PATCH 4/22] Change init/exit functions Jörn Engel
2004-12-21 13:45                                 ` [PATCH 5/22] Remove gcc warnings Jörn Engel
2004-12-21 13:47                                   ` [PATCH 6/22] Remove debug macros Jörn Engel
2004-12-21 13:48                                     ` [PATCH 7/22] Lindent Jörn Engel
2004-12-21 13:49                                       ` [PATCH 8/22] Remove sync interface Jörn Engel
2004-12-21 13:51                                         ` [PATCH 9/22] Change parameter interface to phram-style Jörn Engel
2004-12-21 13:53                                           ` [PATCH 10/22] Cleanup macro usage Jörn Engel
2004-12-21 13:54                                             ` [PATCH 11/22] kfree simplifications Jörn Engel
2004-12-21 13:55                                               ` [PATCH 12/22] change blockmtd_sync Jörn Engel
2004-12-21 13:57                                                 ` [PATCH 13/22] remove erase regions Jörn Engel
2004-12-21 14:01                                                   ` [PATCH 14/22] Change add_device Jörn Engel
2004-12-21 14:02                                                     ` [PATCH 15/22] Rename unreadable mutex Jörn Engel
2004-12-21 14:03                                                       ` [PATCH 16/22] list changes Jörn Engel
2004-12-21 14:04                                                         ` [PATCH 17/22] Rename central struct Jörn Engel
2004-12-21 14:06                                                           ` [PATCH 18/22] Function renaming Jörn Engel
2004-12-21 14:09                                                             ` [PATCH 19/22] Fold various erase functions Jörn Engel
2004-12-21 14:10                                                               ` [PATCH 20/22] Fold various write functions Jörn Engel
2004-12-21 14:11                                                                 ` [PATCH 21/22] Default erase size Jörn Engel
2004-12-21 14:13                                                                   ` [PATCH 22/22] Readahead Jörn Engel
2004-12-21 18:42                                                   ` [PATCH 13/22] remove erase regions Christopher Hoover
2004-12-21 18:49                                                     ` Jörn Engel
2004-12-21 21:09                                                       ` Christopher Hoover
2004-12-22  2:47                                                         ` Eric W. Biederman
2004-12-22  8:59                                                           ` Jörn Engel
2004-12-22 10:05                                                             ` Eric W. Biederman [this message]
2004-12-22 10:41                                                               ` Jörn Engel
2004-12-21 13:42                           ` [PATCH 1/22] Add drivers/mtd/devices/blockmtd.c Gareth Bult (Encryptec)
2004-12-21 14:15                             ` Jörn Engel
2004-12-21 13:40                         ` JFFS2 mount time Gareth Bult (Encryptec)
2004-12-21 15:00                           ` David Woodhouse
     [not found]                             ` <1103644945.10792.175.camel@squizzey.bult.co.uk>
2004-12-21 16:04                               ` Jörn Engel
2004-12-16 13:43 ` Ferenc Havasi
2004-12-20 16:01   ` Gareth Bult (Encryptec)
2004-12-20 16:09     ` Ferenc Havasi
2004-12-20 16:39       ` Gareth Bult (Encryptec)
2004-12-20 17:48       ` Gareth Bult (Encryptec)

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=m3y8fqtzql.fsf@maxwell.lnxi.com \
    --to=ebiederman@lnxi.com \
    --cc=ch@murgatroid.com \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-mtd@lists.infradead.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 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.