read_pnode: error -22 reading pnode at XX:YYYYY

Artem Bityutskiy dedekind1 at gmail.com
Mon May 30 12:07:58 EDT 2011


On Fri, 2011-05-27 at 15:26 -0500, Rick Johnson wrote:
> I had some other observations that I might as well note too.
> 
> We had added code to constantly check the value of pnode->num versus the 
>   num returned from calc_pnode_num_from_parent().  We noticed errors 
> mainly in two places: ubifs_pack_pnode() and ubifs_get_pnode().
> 
> The ubifs_get_pnode() was more interesting though.  We only got a 
> corrupted 'num' value when the function returned the pnode from memory 
> and not from flash.  In other words, when ubifs_get_pnode() followed 
> this path:
> 
> branch = &parent->nbranch[iip];
> pnode = branch->pnode;
> if (pnode)
>    return pnode;
> 
> So it seems like 'num' is getting corrupted or changed while the pnode 
> is in memory.  If it being corrupted in memory, it's strange that 'num' 
> is so consistently targeted and that the corruption is not more random.

Well, there is some bug somewhere which corrupts memory, or this field,
I guess. I guess. I'd started putting more and more "targeted" checks at
different places and tried to narrow down the point when it gets
corrupted.

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




More information about the linux-mtd mailing list