JFFS2 & NAND failure
David Woodhouse
dwmw2 at infradead.org
Sat Nov 20 14:19:26 EST 2004
On Fri, 2004-11-19 at 17:22 +0100, Estelle HAMMACHE wrote:
>
> Here is an example of the obsolete node/refiled nextblock pb:
> - page size 512 bytes
> - start condition: wbuf contains 500 bytes
> jffs2_write_dnode call, total node size 700 bytes
> -->jffs2_flash_writev
> ------>fill up wbuf
> ------>donelen = 12
> ------>jffs2_flush_wbuf (succeeds)
> ------>c->mtd->writev_ecc to write 1 page - fails
> ------>nextblock is refiled (new code!)
> ------>*retlen = donelen (= 12)
> -->add obsolete frag for dirtied space
> ------> free raw node & return early because c->nextblock == 0
> -->probable segfault on (redundant?) jffs2_mark_node_obsolete
> -->retry.
This is the problem, surely? If we've refiled the nextblock, we should
return retlen == 0.
--
dwmw2
More information about the linux-mtd
mailing list