Vitaly Wool wrote:
> On 3/22/07, Chris Paulson-Ellis <chris@edesix.com> wrote:
>> I noticed that if the MTD layer finds and corrects ECC errors, then
>> nand_read will return -EUCLEAN rather than 0. Yaffs doesn't seem to
>> recognise this return code as "we had some problems, but fixed them", so
>> will regard these reads as failures. This will cause the block to be
>> prematurely marked bad.
>
> The right thing to do here will be move the data from this block to a
> free one and mark this one for retirement.
Indeed. Also, my flash device supports an in-device block-to-block page
copy command to speed up this recovery operation. Neither Linux MTD nor
YAFFS support this concept as far as I can tell.
C.