UBIFS Corrupt during power failure

Eric Holmberg Eric_Holmberg at Trimble.com
Wed Jun 3 09:50:34 EDT 2009


> On Fri, 2009-05-15 at 09:16 +0200, Stefan Roese wrote:
> > Do you have an update for this? What's the current status 
> on your system now? 
> > Which patches did you apply to work reliably with the 
> Spansion FLASH?
> > 
> > I'm asking since we are seeing a similar issue on one of 
> our boards equipped 
> > with the S29GL512P. This simple script triggers problems 
> upon the next mount:
> 
> FYI. Since this issue has not been resolved due to lack of 
> information,
> I've updated UBIFS FAQ and put a note about this issue there:
> http://www.linux-mtd.infradead.org/faq/ubifs.html#L_powercut
> 
> -- 
> Best regards,
> Artem Bityutskiy (Битюцкий Артём)

Thanks Artem - I appreciate the honesty in the FAQ.

Sorry for the delays on getting you real information - I am working on it as much as I can.  Due to our project schedule here, I can only work on this a few minutes a day.

I have reproduced the CRC error, but looking at the data (shown below), I am not sure what data is expected in LEB 1 at the failed position.  I don't see anything that indicates that the write-buffer behavior that I have avoided by limiting the write-buffer size to 8 bytes is causing the problem.

[42949375.500000] UBIFS error (pid 1): ubifs_check_node: bad CRC: calculated 0x714960f4, read 0x3dae4f0a
[42949375.510000] UBIFS error (pid 1): ubifs_check_node: bad node at LEB 1:89600
[42949375.520000] UBIFS error (pid 1): ubifs_scanned_corruption: corrupted data at LEB 1:89600
[42949375.540000] UBIFS error (pid 1): ubifs_scan: LEB 1 scanning failed
[42949375.580000] UBIFS error (pid 1): ubifs_recover_master_node: failed to recover master node

LEB 1:89600 refers to address 0x31c75e00 for the NOR flash and looks like it contains nothing but zeros.

31c75e00: 00000000 00000000 00000000 00000000    ................
31c75e10: 00000000 00000000 00000000 00000000    ................
31c75e20: 00000000 00000000 00000000 00000000    ................
31c75e30: 00000000 00000000 00000000 00000000    ................
31c75e40: 00000000 00000000 00000000 00000000    ................
31c75e50: 00000000 00000000 00000000 00000000    ................
31c75e60: 00000000 00000000 00000000 00000000    ................
31c75e70: 00000000 00000000 00000000 00000000    ................
31c75e80: 06101831 3dae4f0a 000ecc9b 00000000    1....O.=........

Since this is the root file system and is 28MB in size, I am working on creating a smaller file system and writing a fixed test pattern to it.  I will provide the dd images of these files along with log files as soon as possible which will hopefully be next Monday (June 8).

If you have any addition suggestions or requests, please let me know.

Regards,

Eric Holmberg
Trimble Navigation








More information about the linux-mtd mailing list