[PATCH 13/22] remove erase regions

Jörn Engel joern at wohnheim.fh-wedel.de
Wed Dec 22 05:41:37 EST 2004


On Wed, 22 December 2004 03:05:06 -0700, Eric W. Biederman wrote:
> 
> 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.

Yup.  One block (plus a few bytes) is the lower bound.  Below that,
you can read-modify-erase-update and hope the power won't fail before
you're done.  Not fun.

> block2mtd ?

Deal.

> 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.

Agreed.  Just ugly then.

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

;)

Jörn

-- 
Those who come seeking peace without a treaty are plotting.
-- Sun Tzu




More information about the linux-mtd mailing list