JFFS2 & NAND failure

Estelle HAMMACHE estelle.hammache at st.com
Mon Apr 4 09:58:45 EDT 2005


Hi Artem,

I ran the deadlock test with your patch and did not
observe any deadlock nor any other problem.


> -                       ret = jffs2_flash_read(c, ofs, readlen, &retlen, ebuf);
> +                       if (!jffs2_is_writebuffered(c) || !jffs2_cleanmarker_oob(c))
> +                               ret = c->mtd->read(c->mtd, ofs, readlen, &retlen, ebuf);
> +                       else
> +                               ret = c->mtd->read_ecc(c->mtd, ofs, readlen, &retlen, ebuf, NULL, c->oobinfo);
> +
>                         if (ret) {
>                                 printk(KERN_WARNING "Read of newly-erased block at 0x%08x failed: %d. Putting on bad_list\n", ofs, ret);
>                                 goto bad;


However I don't use MTD drivers, and I have no ECC 
implementation so far, so I don't know whether 
read_ecc could return an error (maybe EBADMSG) when 
it finds that the page and OOB are all FF.
Maybe just calling mtd->read unconditionally is 
good here ?

bye
Estelle




More information about the linux-mtd mailing list