JFFS2 & NAND failure

Estelle HAMMACHE estelle.hammache at st.com
Wed Dec 15 07:33:45 EST 2004


Hi everyone,

it seems there is a problem with jffs2_wbuf_recover and
the wbuf_sem...

jffs2_flash_writev
** down_write(&c->wbuf_sem);  !!!
** __jffs2_flush_wbuf
**** jffs2_wbuf_recover
******  jffs2_block_refile
********  nextblock = NULL;
******  jffs2_reserve_space_gc
********  jffs2_do_reserve_space
**********  jffs2_erase_pending_blocks
************  jffs2_mark_erased_block
**************  jffs2_flash_read
****************  down_read(&c->wbuf_sem); !!!

I believe that when checking a newly erased block, the
wbuf should not be used anyway, so this is probably easy to
correct. Is it ok to create a jffs2_flash_read_nobuf function
and call it only from jffs2_mark_erased_block ?

Also, still looking at the same recovery scheme, I believe
the following could happen if there are no free or erasing
blocks (but is it really possible ???)

jffs2_flash_writev
** __jffs2_flush_wbuf
**** jffs2_wbuf_recover
******  jffs2_block_refile
********  nextblock = NULL;
******  jffs2_reserve_space_gc
********  jffs2_do_reserve_space
********** jffs2_flush_wbuf_pad
************  __jffs2_flush_wbuf

bye
Estelle




More information about the linux-mtd mailing list