failure to mount partition after flash_eraseall -j
Jeff Hane
jhane at mobilygen.com
Mon Dec 10 18:17:21 EST 2007
I've got a nand chip that I've erased using flash_eraseall -j but it
still fails to mount.
It is failing because of the cleanmarker compare is failing.
flash_eraseall writes a cleanmarker of size 8 or less. It gets this
length from the *first* oobfree area. In my case, this is 7.
However, when trying to mount the chip and the function
jffs2_check_nand_cleanmarker it does this:
cmlen = min_t(int, c->oobavail, OOB_CM_SIZE);
OOB_CM_SIZE is 8 but oobavail is the total of all the available oob not
just the first segment(43 in my case). So them memcmp fails because it
tries to compare 8 bytes instead of 7.
Should flash_eraseall try to see if there is a total of 8 free bytes of
oob area. However, the MEMWRITEOOB ioctl still uses OOB_PLACE and not
OOB_AUTO so this seems like it would still not work?
If I'm missing something let me know otherwise I'm open for
suggestions.
thanks,
jeff
More information about the linux-mtd
mailing list