jffs2 BUG() on mount
Ladislav Michl
ladis at linux-mips.org
Mon Apr 10 05:09:11 EDT 2006
On Tue, Apr 04, 2006 at 11:34:30AM +0400, Artem B. Bityutskiy wrote:
> Actually, there is a jffs2_build_filesystem() function which walks all
> inodes with nlink == 0 and pretends to dispense with them. I believe
> that function is the right place to fix. I ganced at it, and it appeared
> to be thet it calls jffs2_mark_node_obsolete() for all nodes of this
> inode. jffs2_mark_node_obsolete() is a huge and fearsom monster-function
> which may do something wrong.
Problem appeared to be GC thread waiting for inode being read. On next run
this inode was incorrectly skipped before jffs2_do_read_inode_internal
marked it obsolete. Bug was fixed by decrementing c->checked_ino before
jffs2_garbage_collect_pass returns (for INO_STATE_READING) so on next GC
run it is checked again.
Many thanks to David Woodhouse and Artem B. Bityuckiy for help with
debugging.
Best regards,
ladis
More information about the linux-mtd
mailing list