On Fri, Apr 8, 2016 at 3:53 PM, 肖平 <xiaopin7206568@163.com> wrote:
Hi,
Nand Flash will be scanned when yaffs2 mount.If not find checkpoint,yaffs2 will scan blocks and chunks.when yaffs2 scans the chunk,Nand Flash will be readed.If there have some error ,operation maybe fail,but the yaffs2 doesn't check the return value and contiune scan,there haver any problem?

Hello

This is a very tricky place to figure out how to do the best thing. Clearly it would be a bad idea to abort the whole scan if there is one bad page read.

There are some checks in that the ecc result is checked.

        } else if (tags.ecc_result ==
                YAFFS_ECC_RESULT_UNFIXED) { 
                yaffs_trace(YAFFS_TRACE_SCAN,
                        " Unfixed ECC in chunk(%d:%d), chunk ignored",
                        blk, chunk_in_block);
                        dev->n_free_chunks++;

If the ECC result is Ok, then it is reasonable to expect the whole chunk read to be Ok.

-- Charles

 


 


_______________________________________________
yaffs mailing list
yaffs@stoneboat.aleph1.co.uk
http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs