[U-Boot] Unreadable UBIFS partition after power cuts

Heiko Schocher
2015-01-14T14:57:31Z

Hello Anton,

Am 14.01.2015 13:52, schrieb Anton Habegger:
> Hello
>
> We have a PPC MPC5125 device with 64MB NOR flash. The U-boot has to load the kernel and initramfs from a UBIFS partition.
> Recently we made an upgrade from U-Boot version V2010.12 to version V2014.10. Now after some regression tests with power cuts, we got an UBIFS state, which is unreadable for U-Boot version V2014.10. If I do a tftpboot an mount the UBIFS with linux, there is no problem. It is also very strange, that if I downgrade the U-Boot to V2010.12, then it is also no problem with the partition and everything is readable. I tend to say there is probably a regression with the most recent U-Boot version. But I don't know where I can start to find it. I enabled also the DEBUG define, but there appears no additional debug message concerning UBIFS. How can I debug this?

You can enable:

#undef CONFIG_UBI_SILENCE_MSG
#define CONFIG_MTD_DEBUG
#define CONFIG_MTD_DEBUG_VERBOSE 1

With which Linux version do you test? U-Boot is synced with
linux 3.15 ... so, if you can test it with a kernel >= 3.15
this would be great!

> Here the output from U-Boot V2014.10:
>
> => ubi part fs
> UBI: attaching mtd1 to ubi0
> UBI: scanning is finished
> UBI: attached mtd1 (name "mtd=0", size 63 MiB) to ubi0
> UBI: PEB size: 131072 bytes (128 KiB), LEB size: 130944 bytes
> UBI: min./max. I/O unit sizes: 1/64, sub-page size 1
> UBI: VID header offset: 64 (aligned 64), data offset: 128
> UBI: good PEBs: 504, bad PEBs: 0, corrupted PEBs: 0
> UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
> UBI: max/mean erase counter: 280/161, WL threshold: 4096, image sequence number: 2041090957
> UBI: available PEBs: 0, total reserved PEBs: 504, PEBs reserved for bad PEB handling: 0
> => ubifsmount ubi:flash
> => ubifsls
> 53549 Mon Dec 01 11:34:08 2014 setup.xml
> 2051 Wed Nov 19 09:05:49 2014 LOG_Default_000001.csv
> filldir: Error in ubifs_iget(), ino=44049 ret=ffffffea!

seems a problem in ubifs_iget() fs/ubifs/super.c ... it returns -EINVAL
please debug into this function for a starting point.

Thanks!

bye,
Heiko

>
> Regards
> Anton
>
> ********************************************************************************************************************************
> This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain
> confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited.
> If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
> [Delta Energy Systems]
> ********************************************************************************************************************************
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany