flash_eraseall -j / jffs2 oobfree / OneNAND

Pete MacKay linux at architechnical.net
Wed Jul 18 19:28:43 EDT 2007


Looking at the latest mtd-utils.git pull I see that flash_eraseall -j
truncates the cleanmarker to the length in the first oobfree structure,
which is a bug for a segmented OOB like the OneNAND.  (It has a 3 free
bytes at offset 2 and another 2 at offset 14 so it has to truncate to 5
anyway).  This causes unnecessary erase cycles on the scan when I mount a
jffs2 file system.

Also in onenand_base.c:onenand_fill_auto_oob there may be a bug (overrun)
in checking free->length for the onenand_oob_32 structure, which only has
4 (< MTD_MAX_OOBFREE_ENTRIES) oobfree entries.

Should I hack this locally, or am I seeing something that affects anyone
else?

Thanks,
Pete MacKay



More information about the linux-mtd mailing list