[PATCH] UBIFS: fix master node recovery

Artem Bityutskiy dedekind1 at gmail.com
Thu Jul 7 03:57:05 EDT 2011


On Thu, 2011-07-07 at 09:43 +0200, Anatolij Gustschin wrote:
> Yes, in our case we have 511 valid master nodes + 384 bytes free
> space in LEB 2 and one valid master node in LEB 1 + free space.
> 
> > What we want to check is that there is no room for another master node
> > in the second LEB. We have to take offs2, add sz, and make sure that LEB
> > size minus that is less than sz, i.e., exactly what you have done.
> > 
> > And  offs2 + sz >= c->leb_size seems to be completely incorrect and
> > should be removed, AFAICS. Can you confirm that?
> 
> Yes, offs2 + sz >= c->leb_size check is not correct, I think.

I also think so. Could you send v2 of your patch - kill the incorrect
check and add your correct check instead.

I do not have time for testing this now, so I'd ask you go test it. But
I realize that power cut testing can take a lot of time, and your patch
looks right to me, so I'm happy to take your patch right away, but I'd
anyway ask you to conduct some testing anyway and inform about your
results later.

BTW, you can try the power cut emulation testing. If you care a lot
about power-cut robustness, it is helpful. The integck test now can do
power cut emulation testing with UBIFS. But there still some small
issues, though.

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list