MLC NAND: all 0xff after erase?

Matthieu CASTET matthieu.castet at parrot.com
Fri Aug 17 09:54:40 EDT 2012


Artem Bityutskiy a écrit :
> On Wed, 2012-07-11 at 19:43 +0200, Ivan Djelic wrote:
>> Or, conversely, we could decide that erased pages are simply not
>> ecc-protected
>> (which is the actual truth with many drivers), can contain anything
>> (including
>> bitflips), and should be signalled as erased and dealt with in upper
>> layers... 
> 
> I did not not investigate this in details, but I believe UBI and UBIFS
> can be changed and they can allow for a number of bit-flips. There are
> only few places (may be even 2 - one in UBI and one in UBIFS) which
> check if the area contains all 0xFFs. I do not see any obstacles
> improving this and implement a smarter functions which would take a
> buffer, it's length, ecc step size, and max allowable bit-flips as a
> parameter, and check if the page is empty. This could even be an MTD
> helper, something like 'mtd_area_is_empty()'.
> 
> I think in UBI we only verify if an area is empty in the debugging code,
> to make sure we never write over older data. Should be easily fixable.
AFAIK, we also check it when we do bit scrubbing on dynamic volume. We need to
guess the written data size to do crc on it and not on the whole LEB (become it
can be written later and will make the crc false).

Matthieu



More information about the linux-mtd mailing list