Re: [Yaffs] Yaffs2 generate many badblocks

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Patrick
Date:  
To: Charles Manning
CC: yaffs
Subject: Re: [Yaffs] Yaffs2 generate many badblocks
~# cat /proc/yaffs
Multi-version YAFFS built:May 22 2012 16:22:05

~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00020000 "xload"
mtd1: 00040000 00020000 "barebox"
mtd2: 00020000 00020000 "bareboxenv"
mtd3: 00400000 00020000 "kernel"
mtd4: 3fb80000 00020000 "root"


Yes I started with an erased partition then mounting it with yaffs2.

I have tried "flash_erase -N /dev/mtd4 0 0" to revert the badblocks but
it doesn't work (the kernel could not erase a block marked as bad).

I have tried mount -t yaffs2 -o"inband-tags" with a new flash and I have
no more badblocks.

So the problems is from the mtd driver ? mtd badblocks is used by yaffs2
and not jffs2, right ?

Patrick

On 05/23/2012 12:01 AM, Charles Manning wrote:
> On Wednesday 23 May 2012 04:30:26 Patrick wrote:
>> Hello all,
>>
>> I am using yaffs2-7862c13 on a Linux 3.3 kernel on ARM (omap4).
>> When writing to the yaffs2 partition I could never write more than
>> approximatively half the size of the partition after the partition looks
>> like full.
>>
>> Then if I try to erase the partition with flash_erase I have many
>> (approx. half of the partition) badblocks that I could never revert.
>
> There should be a way to flash_erase scrubbing bad blocks.
>
>
>>
>> I have tried exactly the same manipulation on the same hardware with the
>> same kernel (but with a new flash) using jffs2 instead of yaffs2 and I
>> have not this problems of badblocks.
>>
>> The flash is a 1Gb with 2048 bytes blocks.
>
> Please send the output from
>
> cat /proc/yaffs
> cat /proc/mtd
>
>>
>> Do you have any idea why ?
>
> First off did you start with an erased partition?
>
> If you started with an erased partition and a whole lot of bad blocks are
> generated when you write then the most likely cause is that your NAND driver
> is broken in some way and is writing tags over the bad block markers.
>
> One way to check that is to use yaffs2 with inband tags. That does not write
> tags to the oob area and will thus sidestep problems like this.
>
> mount -t yaffs2 -o"inband-tags" ...
>
>> How could I revert the badblocks markers ?
>>
>> Thanks for your help.
>>
>> Patrick
>>
>>
>> _______________________________________________
>> yaffs mailing list
>>
>> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>
>