Hi Charles,
Yes, I totally agree with you. But one question is how to distinguish REFRESH_NEEDED and FIXED_BUT_SUSPECT.
I think a good method is to distinguish by bit flip level. For example, define the max_ecc_cap is max ecc capability for one NAND flash, if one block bit flip exceed one third of max_ecc_cap, just consider this block as REFRESH_NEEDED, and refresh it. But if one block bit flip exceed two-third of max_ecc_cap, consider this block as FIXED_BUT_SUSPECT. Because normally, bit flip number increase by one or a few bit every time, when bit flip reach one third of max_ecc_cap, it will be refreshed, and never can be to two third of max_ecc_cap. If a block reach two-third of max_ecc_cap, we can consider it as suspect.
But now, MTD layer read function only return –EUCLEAN to YAFFS2, YAFFS2 cannot get how many bit flip occur.
So can you share what’s you opinion for how to distinguish REFRESH_NEEDED and FIXED_BUT_SUSPECT?
Thanks
From: Charles Manning [mailto:cdhmanning@gmail.com]
Sent: Friday, May 09, 2014 7:45 AM
To: Qi Wang 王起 (qiwang)
Cc: yaffs@lists.aleph1.co.uk
Subject: Re: [Yaffs] Bad Block definition
This issue has been discussed a few times and raises some interesting issues.
Yes, some flash parts say to consider bit flips as not bad - just refresh - but the other side to this is that if blocks experience MANY bit flips they are maybe going bad and we want to catch the problem before data is lost.
It might be time to introduce a third level of error. ie something like:
* NO_ERROR : No problems.
* REFRESH_NEEDED: (new) Refresh block, don't worry about it going bad.
* FIXED_BUT_SUSPECT: Treated same as FIXED is now, retire the block if it does this again.
* UNFIXED
-- Charles
On Thu, May 8, 2014 at 5:30 PM, Qi Wang 王起 (qiwang) <qiwang@micron.com> wrote:
Hi,
I see some bad block definition issue in YAFFS2.
In the YAFFS2 read function, when a page occur bit flip more 3 times, the block contain this page will be marked as bad block. as below read function:
int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk,
u8 *buffer, struct yaffs_ext_tags *tags)
{
int result;
struct yaffs_ext_tags local_tags;
int flash_chunk = apply_chunk_offset(dev, nand_chunk);
dev->n_page_reads++;
/* If there are no tags provided use local tags. */
if (!tags)
tags = &local_tags;
result = dev->tagger.read_chunk_tags_fn(dev, flash_chunk, buffer, tags);
if (tags && tags->ecc_result > YAFFS_ECC_RESULT_NO_ERROR) {
struct yaffs_block_info *bi;
bi = yaffs_get_block_info(dev,
nand_chunk /
dev->param.chunks_per_block);
yaffs_handle_chunk_error(dev, bi);
}
return result;
}
But actually, in NAND flash, only program and erase error can be marked bad block. Bit flip symptom is easy happen after a page is read many cycles.
If a system use YAFFS2, and never power down this system, user will see a lot of bad block after they run a time, But this block isn’t a real bad block.
How about just refresh the block when bit flip occur, but not record the bit flip count, and mark it as bad block?
Thanks
Best Regards,
Qi Wang 王起
EBU APAC SE
Tel: 86-021-38997158
Mobile: 86-15201958202
Email: qiwang@micron.com
Address: No 601 Fasai Rd, Pudong, Shanghai, China, 200131
_______________________________________________
yaffs mailing list
yaffs@lists.aleph1.co.uk
http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs