[PATCH 13/22] remove erase regions

Eric W. Biederman ebiederman at lnxi.com
Tue Dec 21 21:47:00 EST 2004


"Christopher Hoover" <ch at murgatroid.com> writes:

> >From Jörn Engel [mailto:joern at wohnheim.fh-wedel.de] - 
> > On Tue, 21 December 2004 10:42:07 -0800, Christopher Hoover wrote:
> > > >From Jörn Engel -
> > > > I see absolutely no reason for complicated erase reagions.  On the
> > > > user side, everyone but mtdchar effectively ignores it anyway.
> > > 
> > > I don't grok this.   What about flash with variable-sized 
> > blocks?  (I have a
> > > board with such flash and code that uses eraseregions.)
> > 
> > Sure, from AMD or some other compatible manufacturer.  The
> > variable-sized blocks were nice until there were better solutions to
> > the problem, like jffs2.  Jffs2 exists, so they are largely useless.

jffs2 is only a solution on large NOR flash parts.

However I find this conversation confusing.  The patches appear to affect
just mtdblock.c.  Which sounds like it is exclusively the mtd block device.
At which point I don't see a problem with simply removing variable erase
size for the silly block device emulation code.

Now if someone wants to remove something silly the block device emulation
sounds like a fine place to start.  Just to place the silliness on the
other foot.
 
> Intel C3 flash, too.
> 
> > 5. mtdchar
> 
> This is an important case.  
> 
> The reason embedded systems use flash with variable sized blocks is for (in
> the small blocks) parameter stores for bootloaders and applications.
> 
> I've got several deployed systems that use this technique.  I've seen at
> least one other.

> > 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.  
 
> This is not a reason to toss it.  We don't capriciously break user space
> interfaces in Linux.
> 
> Also this:
> 
> 6. The hook that unlocks locked-on-power-up flash, such as (*surprise*) C3
> flash.  It needs to call unlock with the start address of each block.  It
> needs eraseergions to do that.

If Christopher is reading this right I agree that killing variable
erase sizes across the board is a very bad idea.

Eric




More information about the linux-mtd mailing list