read_pnode: error -22 reading pnode at XX:YYYYY

Artem Bityutskiy dedekind1 at gmail.com
Thu Apr 21 09:20:01 EDT 2011


On Tue, 2011-04-19 at 16:08 -0500, Rick Johnson wrote:
> Hi,
> 
> We've been seeing this error
> 
> "read_pnode: error -22 reading pnode at XX:YYYYY"

Hi, I'm very busy now, but here is a quick hint. It looks like a bug. Do
you do unclean power cuts? It might be a bug in the bits manipulation
functions. In short - a penode describes amount of free and dirty space
in one LEB. We try to store this information as compactly as possible,
so we jam it into bits.

There is a 'ubifs_pack_pnode()' function which is used to jam the
free/dirty information into bits. Try to instrument it with and:

1. Validate the pnode before packing, do the same validate_pnode() does.
May be you'll catch the place where it we write incorrect pnode. Because
what you see is a result of an error which might have happend long
before you hit it.

2. At the end of 'ubifs_pack_pnode()' unpack it and validate again, and
make sure it did not change. May be there is a bug in packing/unpacking
functions, then you will catch this.

I'll try to come up with a patch which does this every time we have
debugging enabled, but not now, no time.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list