[PATCH] flashcp: improve speed & some clean ups

Russ Dill russ.dill at gmail.com
Thu Apr 7 14:45:45 EDT 2011


On Thu, Apr 7, 2011 at 8:04 AM, Frans Meulenbroeks
<fransmeulenbroeks at gmail.com> wrote:
> the speed of the program is improved by:
> - checking if a block needs to be erased before actually erasing it
> - only writing blocks that are not modified
>

I would caution against treating all 0xff blocks as being erased. A
partially erased block will often return mostly 0xff, but some of the
bits are random. If they return 1, you'll think all is well when it is
not. This is why jffs2 has clean-markers. Secondarily, a partially
erased block that randomly returns a few bits that match you data to
be written would also be bad. In fact, no matter what stage power was
lost during an erase cycle, no matter how marginal any percentage of
the bits, your tool will smile and nod if it is writing all zeros.



More information about the linux-mtd mailing list