Re: jffs2 BUG() on mount

Artem B. Bityutskiy
2006-04-04T07:35:10Z

Ladislav Michl wrote:
> jffs2_scan_inode_node adds also inodes with zero nlink to
> unchecked_space, but jffs2_garbage_collect_pass skips them. That
> probably leads to above problem. After applying following patch
> BUG() is no longer triggered.
>

<snip>

> I'm not sure what is correct solution. With this change there are lots of
> JFFS2 warning: (138) jffs2_get_inode_nodes: Eep. No valid nodes for ino #465.
> JFFS2 warning: (138) jffs2_do_read_inode_internal: no data nodes found for ino #465
> Returned error for crccheck of ino #465. Expect badness...
> warnings. Jffs2 summary feature is disabled. I'd be very gratefull for ideas.

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.

--
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.