On Tuesday 09 August 2005 00:26, Ludovic Guilhamat wrote: > Hi, > > I found some other clues about my problem, but I didn't fully manage it > yet... > > Brief summary : I want to use yaffs on linux-2.4.22 kernel with uClinux > (m68k coldfire), and with the MTD of the 2.4.22 kernel. (I attempted to > backport a newer MTD, but without success for the moment). My Flash is a > Samsung 16Mb Nand. Part numbers please. Different parts have different properties. > > So, my problem occurs when I erase a file on my 2Mb partition. More > precisely, it occurs when I want to copy/create some other files. Hence, > I think it's the garbage collect process that is the source of my > problem on my system. In almost all cases, problems that arise during gc are cause by one of: 1) flash geometry issue. The block size you have specified in yaffs or mtd does not match the physical hardware. 2) Some issue with ECC or low-level NAND access functions. > Here is the log: > > * after erasing the file : > > yaffs locking > ___________ really free is 3033, pending 1001, nFree is 4034 > yaffs unlocking > > * When I want to recreate a file after an unmount / mount : > > nand_read_ecc: from = 0x00909e00, len = 512 > nand_read_oob: from = 0x00909e00, len = 16 > nand_write_oob: to = 0x00908000, len = 16 > nand_write_oob: Failed write verify, page 0x00004840 <----- This > corresponds to the (falsely) damaged marked blocks that I see when I > nand_write_oob: to = 0x00908200, len = 16 > nand_write_oob: Failed write verify, page 0x00004841 <----- want to > format my partition. You need to turn off write verification in the mtd and do that in YAFFS instead. > > * Finally, here is the interesting part of 'cat /proc/yaffs' : > > nPageWrites........ 10 > nPageReads......... 181 > nBlockErasures..... 0 > nGCCopies.......... 0 > garbageCollections. 3 <----- It seems that at each garbage > collection, 8Kb are used on my partition (is it normal ?). Then, > passiveGCs......... 3 <----- I find 104Kb used, instead of 80Kb... > nRetriedWrites..... 0 > nRetireBlocks...... 3 Retired blocks == blocks that YAFFS has decided went bad and then marked bad. This is most likely caused by a mismatch between YAFFS and mtd, most likely in either the ECC or similar area. -- Charles