Corrupt empty space

Gupta, Pekon pekon at ti.com
Tue Mar 11 03:00:37 EDT 2014


Hi,

>
>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.
>

I'm facing similar problem with some newer technology NAND devices,
And the above approach is similar to what was proposed in OMAP NAND
driver, But its still under discussion [1]
	if (page_is_erased)
		/* return clean read-buffer */
		memset(buf, 0xff, ecc->size);

However, from 3.9 kernel version, MTD and UBI layer already have checks
for bit-flips threshold [2], so this extra check for all(0xff) data in UBIFS is redundant.
I have just sent an RFC patch to remove this all(0xff) check from UBIFS [3],
I'll let Artem (UBIFS Maintainer) comment on this, as such empty-page
corruptions are common in MLC and newer technology NANDs.


[1] http://lists.infradead.org/pipermail/linux-mtd/2014-March/052472.html
[2] http://lists.infradead.org/pipermail/linux-mtd/2012-April/040945.html
[3] http://lists.infradead.org/pipermail/linux-mtd/2014-March/052499.html


with regards, pekon


More information about the linux-mtd mailing list