flash_eraseall -j / jffs2 oobfree / OneNAND

Kyungmin Park kyungmin.park at samsung.com
Wed Jul 18 20:05:49 EDT 2007


Hi,

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

I will check it soon.

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

No, it also checks free->length with MTX_MAX_OOBFREE_ENTRIES together. So it doesn't overrun. 
E.g., The 'i' has 4, 4 < MTD_MAX_OOBFREE_ENTRIES is true, but free->length is false. So it exits the loop.

I checked it with onenand_sim. 

Thank you,
Kyungmin Park




More information about the linux-mtd mailing list