Corrupt empty space

Kent Li Kent.Li at radisys.com
Tue Mar 11 01:31:49 EDT 2014


Frederic,

I'm not sure if this is the unstable bit issue, but I just resolved such issue by enhancing my Nand driver in both Uboot code and Linux code.

The main idea is:
Read a page
If ( ECC fail ) ;then
	Check the how many 0 bit there is.
	If ( 0 bit number > tolerance value) //tolerance value is depends on the ECC correctable bits.
		Print "Fail to recover by ECC"
	Else
		Force change the 0 bits to 1
	fi
fi

This idea assume that 
1. there is not ECC fail when reading a normal page.
2. sub-page is disabled.
3. only ECC fail happen when reading an empty page.

BR
Kent Li


-----Original Message-----
From: linux-mtd [mailto:linux-mtd-bounces at lists.infradead.org] On Behalf Of HOUR Fréderic
Sent: 2014年3月11日 1:35
To: linux-mtd at lists.infradead.org
Subject: Corrupt empty space

Hello,

I'm working on UBIFS ( linux 3.3, omap138 ). I need some help with a problem on a custom board (omapl138).
I have a software that runs in background and writes data in a UBIFS volume. I can not control when the power cut happens.
Sometimes, when booting my board, I got this "common" error:

UBI: background thread "ubi_bgt0d" started, PID 391
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "log"
UBIFS: file system size:   3174400 bytes (3100 KiB, 3 MiB, 25 LEBs)
UBIFS: journal size:       1015809 bytes (992 KiB, 0 MiB, 6 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: none
UBIFS: reserved for root:  149934 bytes (146 KiB)
UBIFS: recovery needed
UBIFS error (pid 395): ubifs_scan: corrupt empty space at LEB 1534:125170 UBIFS error (pid 395): ubifs_scanned_corruption: corruption at LEB 1534:125170
00000000: ffffff7f ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
[..]
UBIFS error (pid 395): ubifs_scan: LEB 1534 scanning failed

My NAND volume could not be mounted. My problem is that I want to have an access to the files stored in this UBIFS volume.

So I had some questions : 
- What are the risk of commenting out the 'goto corrupted' in the fonction ubifs_scan? (in order to mount my partition and have an access to my files)
- Is this the "unstable bits issue"? (http://www.linux-mtd.infradead.org/doc/ubifs.html#L_unstable_bits)
- What could be a proper solution to get my files?
- Is there a solution using U-Boot?

Thanks for your help.

Regards,

Frederic

#
" Ce courriel et les documents qui lui sont joints peuvent contenir des informations confidentielles, être soumis aux règlementations relatives au contrôle des exportations ou ayant un caractère privé. S'ils ne vous sont pas destinés, nous vous signalons qu'il est strictement interdit de les divulguer, de les reproduire ou d'en utiliser de quelque manière que ce soit le contenu. Toute exportation ou réexportation non autorisée est interdite Si ce message vous a été transmis par erreur, merci d'en informer l'expéditeur et de supprimer immédiatement de votre système informatique ce courriel ainsi que tous les documents qui y sont attachés."
******
" This e-mail and any attached documents may contain confidential or proprietary information and may be subject to export control laws and regulations. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. Unauthorized export or re-export is prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
#


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/


More information about the linux-mtd mailing list