UBI/UBFS: ubi_eba_read_leb() reporting unmapped LEB

Artem Bityutskiy dedekind1 at gmail.com
Mon Oct 20 07:05:12 PDT 2014


On Mon, 2014-10-20 at 14:48 +0100, Steve B wrote:
> Hi Artem,
> 
> Thanks for the reply.
> 
> I have the kernel built with:
> CONFIG_MTD_UBI_DEBUG=y
> CONFIG_UBIFS_FS=y
> 
> The failure was seen on an embedded device, I dumped the flash
> contents (raw format) and then re-constructed the image on my Linux PC
> using nandsim with UBI and UBIFS modules i've built with some extra debugging.
> The call stack in the log posted is the same as the one seen on the device
> that showed the original problem.
> 

I see. Would you post the full log, not just the extract near the
failure message?

>From what I see so far, UBIFS believes that the data of a file is stored
in LEB 352. But UBI says: "nope, this LEB was unmapped".

So the bug may be in both UBIFS and UBI.

When we were writing this code years ago, we were stressing UBIFS
power-cut tolerance a lot. We dead real power cuts, but we did emulated
power cuts a lot more than real. And emulated power cuts only test
UBIFS, not UBI. On the other hand, UBI is very simple comparing to
UBIFS.

BTW, do you have fastmap enabled or disabled?

Are you doing deliberate power cut testing, or you hit this error by
chance? In the former case, you may enable additional debugging,
probably, depending on how many test-boxes are you stressing
simultaneously.

Also, are you 100% sure you "reconstructed" the image correctly, and you
are not wasting time looking at irrelevant errors?

Artem.





More information about the linux-mtd mailing list