JFFS2 & NAND

Thomas Gleixner gleixner at autronix.de
Mon Feb 18 11:02:59 EST 2002


I hacked it, so that JFFS2 uses the c->mtd->ecctype to decide which oob 
layout is given. I tested the system again and destroyed the ECC data on one 
page. When i tried to mount JFFS2 again it failed, because the nand driver 
returned -EIO, as the bad page ECC was seen. 
That's not the way it can go. You have one bad ECC page and all your data are 
lost. 
There are two possibilities to react:
1. Return the raw page data without ECC correction and return 0 (success) and 
let the fs driver detect the invalid stuff on it's own, what JFFS2 actually 
does.

2. Return the raw page data without ECC correction and return a value > 0 to 
inform the fs driver that ECC failed and data maybe corrupted.

I think the 2nd one is the better one. But it gives us a lot of hacking 
inside JFFS2.

-- 
Thomas
__________________________________________________
Thomas Gleixner, autronix automation GmbH
auf dem berg 3, d-88690 uhldingen-muehlhofen
fon: +49 7556 919891 , fax: +49 7556 919886
mail: gleixner at autronix.de, http://www.autronix.de  




More information about the linux-mtd mailing list