>Date: Sun, 13 Nov 2005 12:10:10 +1300 >From: Charles Manning >Subject: [Yaffs]Maybe some issue about GC on yaffs2! >To: yaffs@stoneboat.aleph1.co.uk >Cc: Jian Zhang >Message-ID: <200511131210.10438.manningc2@actrix.gen.nz> >Content-Type: text/plain; charset="utf-8" >... >... >The problem is being caused by mtd not giving back what you wrote itno it. >This is almost certainly caused by corruption of the oob area in mtd. > >-- CHarles hi, Thanks for Charle's reply! I have updated nand_base.c in MTD, and this problem is fixed. But another problem is appear! all is ok except when i do umount/remount. it seems like lost some space when umount/remount. I have dig into the mtd driver but can't find any hints which can cause this problem. here is my log of operations. any comments will welcome! Best Regards! Jiang Zhang 1)*****eraseall 2)*****mount 3)*****cat /proc/yaffs Device 0 "EP9312 USER" startBlock......... 0 endBlock........... 2047 chunkGroupBits..... 2 chunkGroupSize..... 4 nErasedBlocks...... 2048 nTnodesCreated..... 0 nFreeTnodes........ 0 nObjectsCreated.... 100 nFreeObjects....... 96 nFreeChunks........ 131072 nPageWrites........ 0 nPageReads......... 0 nBlockErasures..... 0 nGCCopies.......... 0 garbageCollections. 0 passiveGCs......... 0 nRetriedWrites..... 0 nRetireBlocks...... 0 eccFixed........... 0 eccUnfixed......... 0 tagsEccFixed....... 0 tagsEccUnfixed..... 0 cacheHits.......... 0 nDeletedFiles...... 0 nUnlinkedFiles..... 0 nBackgroudDeletions 0 useNANDECC......... 1 isYaffs2........... 1 4)*****df /dev/mtdblock/5 262144 768 261376 0% /mnt/nfs 5)*****cp files to yaffs 6)*****cat /proc/yaffs Device 0 "EP9312 USER" startBlock......... 0 endBlock........... 2047 chunkGroupBits..... 2 chunkGroupSize..... 4 nErasedBlocks...... 921 nTnodesCreated..... 5500 nFreeTnodes........ 65 nObjectsCreated.... 1000 nFreeObjects....... 38 nFreeChunks........ 62488 nPageWrites........ 0 nPageReads......... 0 nBlockErasures..... 0 nGCCopies.......... 0 garbageCollections. 0 passiveGCs......... 0 nRetriedWrites..... 0 nRetireBlocks...... 0 eccFixed........... 0 eccUnfixed......... 0 tagsEccFixed....... 0 tagsEccUnfixed..... 0 cacheHits.......... 0 nDeletedFiles...... 0 nUnlinkedFiles..... 0 nBackgroudDeletions 0 useNANDECC......... 1 isYaffs2........... 1 7)*****df /dev/mtdblock/5 262144 137936 124208 53% /mnt/nfs 8)*****umount 9)*****remount 10)*****cat /proc/yaffs Device 0 "EP9312 USER" startBlock......... 0 endBlock........... 2047 chunkGroupBits..... 2 chunkGroupSize..... 4 nErasedBlocks...... 921 nTnodesCreated..... 5500 nFreeTnodes........ 65 nObjectsCreated.... 1000 nFreeObjects....... 38 nFreeChunks........ 62488 nPageWrites........ 0 nPageReads......... 0 nBlockErasures..... 0 nGCCopies.......... 0 garbageCollections. 0 passiveGCs......... 0 nRetriedWrites..... 0 nRetireBlocks...... 0 eccFixed........... 0 eccUnfixed......... 0 tagsEccFixed....... 0 tagsEccUnfixed..... 0 cacheHits.......... 0 nDeletedFiles...... 0 nUnlinkedFiles..... 0 nBackgroudDeletions 0 useNANDECC......... 1 isYaffs2........... 1 11)*****df /dev/mtdblock/5 262144 137936 124208 53% /mnt/nfs 12)*****rm file rm: unable to remove `./lib/gconv': Directory not empty rm: unable to remove `./lib': Directory not empty rm: unable to remove `./lib2/gconv': Directory not empty rm: unable to remove `./lib2': Directory not empty rm: unable to remove `./lost+found': Directory not empty 13)*****cat /proc/yaffs Device 0 "EP9312 USER" startBlock......... 0 endBlock........... 2047 chunkGroupBits..... 2 chunkGroupSize..... 4 chunkGroupSize..... 4 nTnodesCreated..... 5500 nFreeTnodes........ 4877 nObjectsCreated.... 1000 nFreeObjects....... 373 nFreeChunks........ 130449 nPageWrites........ 0 nPageReads......... 0 nBlockErasures..... 263 nGCCopies.......... 0 garbageCollections. 263 passiveGCs......... 263 nRetriedWrites..... 0 nRetireBlocks...... 0 eccFixed........... 0 eccUnfixed......... 0 tagsEccFixed....... 0 tagsEccUnfixed..... 0 cacheHits.......... 0 nDeletedFiles...... 820 nUnlinkedFiles..... 1293 nBackgroudDeletions 0 useNANDECC......... 1 isYaffs2........... 1 14)*****df /dev/mtdblock/5 262144 2016 260128 1% /mnt/nfs 15)*****umount 16)*****remount 17)*****cat /proc/yaffs Device 0 "EP9312 USER" startBlock......... 0 endBlock........... 2047 chunkGroupBits..... 2 chunkGroupSize..... 4 nErasedBlocks...... 1163 nTnodesCreated..... 4400 nFreeTnodes........ 214 nObjectsCreated.... 1000 nFreeObjects....... 373 nFreeChunks........ 78597 nPageWrites........ 0 nPageReads......... 0 nBlockErasures..... 0 nGCCopies.......... 0 garbageCollections. 0 passiveGCs......... 0 nRetriedWrites..... 0 nRetireBlocks...... 0 eccFixed........... 0 eccUnfixed......... 0 tagsEccFixed....... 0 tagsEccUnfixed..... 0 cacheHits.......... 0 nDeletedFiles...... 0 nUnlinkedFiles..... 958 nBackgroudDeletions 0 useNANDECC......... 1 isYaffs2........... 1 18)*****df /dev/mtdblock/5 262144 105720 156424 40% /mnt/nfs here, I can see nothing in NAND flash, but if I copy some files beyond 156M, it will report "Cannot allocate memory".