Faster flash_eraseall for NOR flash

Mike Frysinger vapier.adi at gmail.com
Tue Dec 14 09:52:53 EST 2010


On Tue, Dec 14, 2010 at 04:20, Øyvind Harboe wrote:
> CFI erase performance can be 10x slower than write
> performance on CFI flashes.
>
> I've added an option to skip already erased CFI blocks. This
> includes checking if the JFFS2 cleanmarker is written.

i dont think -f/--fast is the right name.  how about something a bit
more explicit like --skip-erased ?

why cant this also be used for NAND ?  all the NAND devices i use have
0xff when erased.

other random problems:
 - the coding style of this patch is incorrect.  please review the
style found in the rest of the file.  such as brace placement and
spaces in function calls.
 - your patch is not against the master branch -- there is no
"flash_eraseall.c" file anymore.
 - once you update, your code will look vastly different as there are
helpers to do memory allocation/error output/etc...
 - better to use pread() rather than lseek()/read().
-mike



More information about the linux-mtd mailing list