Oops in mounting jffs2 (jffs2_get_ino_cache())

David Woodhouse dwmw2 at infradead.org
Fri May 2 03:31:05 EDT 2003

On Wed, 2003-04-30 at 21:41, David Woodhouse wrote:
> On Wed, 2003-04-30 at 21:22, Vipin Malik wrote:
> > I'm using CVS code (HEAD) from Feb 16th on x86 w/ NOR flash chips (AMD).
> > 
> > I've been doing pwr fail testing on my application code and during a power 
> > up I got the following Oops.
> http://lists.infradead.org/pipermail/linux-mtd/2003-February/007115.html
> cvs up

Urgh. That fix isn't enough. The idea is that we file nodes against the
inode number they claim to belong to, and only later when we check the
crc do we throw away the bogus ones such as the one you found, which
claim to belong to inode #0xffffffef.

Unfortunately, this still means that we set c->highest_ino to
0xffffffef, and the inode numbers are going to wrap around fairly
quickly thereafter, leading to massive corruption since we don't
actually check for ino# wrap -- we don't really expect to ever get past
4 milliard inodes, and we just start again at zero.

I think I need to fix the ino wrap case, and also check the node_crc
during mount _if_ the node in question is causing us to allocate a new
jffs2_inode_cache -- i.e. if it's for an inode we haven't seen before.


More information about the linux-mtd mailing list