Re: [Yaffs] Kernel upgrade 2.6.10 to 2.6.22 causing yaffs co…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Ian McDonnell
Date:  
To: Ben Dooks
CC: yaffs
Subject: Re: [Yaffs] Kernel upgrade 2.6.10 to 2.6.22 causing yaffs corruption
Ben,

It looks like you have made progress with the main layout
issues. There maybe one more to consider...

On Friday 12 October 2007 07:39, Ben Dooks wrote:
> I've run output from both 2.6.10 and 2.6.22 showing the data
> in the OOB:
>
> writing file on 2.6.10:
>
> nandmtd_WriteChunkToNAND: writing chunk 32 oob00,00,10,00
> ff,ff,05,01 nandmtd_WriteChunkToNAND: writing chunk 33
> oob01,00,10,80 ff,ff,05,01 nandmtd_WriteChunkToNAND: writing
> chunk 34 oob02,00,10,80 ff,ff,05,01 nandmtd_WriteChunkToNAND:
> writing chunk 35 oob03,00,10,80 ff,ff,05,01
> nandmtd_WriteChunkToNAND: writing chunk 36 oob04,00,10,80
> ff,ff,05,01
>
> on 2.6.22 on mount:
>
> ==> chunk 0: OOB read00,00,10,00 05,01,04,40
> ==> chunk 32: OOB read00,00,10,00 00,ff,05,01
> ==> chunk 64: OOB read20,00,10,80 ff,ff,05,01
>
> It seems to be reading the same data from chunk 32, but it is
> now ignorning the file on the filesystem. Chunk 0 is on the
> first block which now seems to be worn out from the repeated
> erase/program cycles of testing.


You may want to look at whether the yaffs '9BYTE_TAGS' config
option meets your needs for compatibility between MTD revisions.

Your older 2.6.10 setup would have been using a separate byte of
oob/spare for the yaffs 'pageStatus' byte. This usage had to be
reworked when MTD's NAND interface was overhauled and yaffs lost
the ability to read/write extra oob bytes. On 2.6.18 and later
yaffs will use a single bit for 'deleted (pageStatus)' and stay
within the 8 byte 'oobavail' provided by the standard MTD
layout. A 9th byte is normally available, it's just not
advertised by MTD :(

If you enable CONFIG_YAFFS_9BYTE_TAGS, yaffs will use the old
method of recording page status and use an extra byte for
'pageStatus'. In order to provide the extra byte, MTD's layout
policy needs include the additional byte in it's nand_ecclayout
oobfree list. See the comment at the top of yaffs_mtdif1.c for
an example. See the mail archive for other tips/details.

-imcd