On 8/26/05, Charles Manning wrote: > On Thursday 25 August 2005 21:15, Manav Gautam wrote: > > Dear All, > > I have a build with the cvs version of yaffs1/yaffs2 > > integrated. I can successfully mount the partition and copy > > large/small files to the chip without any problems. The issue is that > > all the data is lost when i umount and remount it . I have tried this > > with different kernel versions , frank's yaffs patch , balloon > > kernels, cvs yaffs but the issue remains the same. Below is a detailed > > log > > You should not need to apply any of Frank's patches. THey shuld all be taken > care of in the existing CVS. > > Which version of mtd are you using? It is normally better to pull the latest > from CVS. Using the august 25 snapshot of mtd > > Have you tried the yaffs1 cvs tree? This might (but should not) perform > differently. Tried yaffs1 cvs tree and still facing the same issue. And i notice in yaffs1 when i umount and mount the partition again after copying some data , it is lost but i find a ./obj19886 not found message when i execute a ls -la command in lost+found directory. This is the case for the balloonboard 2.4 kernels. > > > > My .config is > > CONFIG_YAFFS_FS=y > > CONFIG_YAFFS_YAFFS1=y > > CONFIG_YAFFS_DOES_ECC=n > > CONFIG_YAFFS_ECC_WRONG_ORDER=y > > CONFIG_YAFFS_YAFFS2=y (* Had to enable this else it compilation cracks up) > > CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK=y > Suggest leave the chunk erased check enabled (ie. set this config disabled). > > CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y > > > > > > $Id: yaffs_guts.c,v 1.18 2005/08/16 02:28:04 charles Exp $ > > > > Device 0 "Filesystem on nand" > > startBlock......... 0 > > endBlock........... 4095 > > chunkGroupBits..... 2 > > chunkGroupSize..... 4 > > nErasedBlocks...... 1535 > > nTnodesCreated..... 0 > > nFreeTnodes........ 0 > > nObjectsCreated.... 100 > > nFreeObjects....... 96 > > nFreeChunks........ 49120 > > 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........... 0 > > > > > > [root@Sarva 2.6.13]#cat /proc/yaffs > > YAFFS built:Aug 25 2005 09:02:20 > > $Id: yaffs_fs.c,v 1.29 2005/08/11 01:07:43 marty Exp $ > > $Id: yaffs_guts.c,v 1.18 2005/08/16 02:28:04 charles Exp $ > > > > Device 0 "Filesystem on nand" > > startBlock......... 0 > > endBlock........... 4095 > > chunkGroupBits..... 2 > > chunkGroupSize..... 4 > > nErasedBlocks...... 1534 > > nTnodesCreated..... 100 > > nFreeTnodes........ 99 > > nObjectsCreated.... 100 > > nFreeObjects....... 95 > > nFreeChunks........ 49104 > > nPageWrites........ 18 > > nPageReads......... 1 > > 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........... 0 > Since the nErasedBlocks went down and the nFreeChunks went down, this means > yaffs did write something to NAND. Yes i notice all along my copy operations i somehow loosing space on the nand but no data to be seen anywhere. > > What is curious to me is that you have a file system of 4096 blocks, with 1534 > free yet the fs looks empty. Have you looked in lost+found? Did look in that too but its been empty. > > Did you erase the flash first? I erased the flash using flash_eraseall I will again log the output of the cvs mtd, cvs yaffs and 2.6.13-rc6 kernel with my driver havin the NAND_ECC_NONE option set , this is also because i can see that when i insmod my driver the bad eraseblocks do not sync with the bad blocks defined during scanning that yaffs produces -- mtd/yaffs or driver ?.. Well it still is the same , doesnt matter if i use NAND_ECC_SOFT or NONE , and my .config looks like CONFIG_YAFFS_FS=y CONFIG_YAFFS_YAFFS1=y CONFIG_YAFFS_DOES_ECC=y # CONFIG_YAFFS_ECC_WRONG_ORDER is not set CONFIG_YAFFS_YAFFS2=y # CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK is not set CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y [root@Sarva 2.6.13]#insmod manavd.ko ........... Bad eraseblock 4071 at 0x03f9c000 Bad eraseblock 4072 at 0x03fa0000 Bad eraseblock 4075 at 0x03fac000 Bad eraseblock 4076 at 0x03fb0000 Bad eraseblock 4077 at 0x03fb4000 Bad eraseblock 4081 at 0x03fc4000 Bad eraseblock 4083 at 0x03fcc000 Bad eraseblock 4084 at 0x03fd0000 Bad eraseblock 4085 at 0x03fd4000 Bad eraseblock 4086 at 0x03fd8000 Bad eraseblock 4087 at 0x03fdc000 Bad eraseblock 4088 at 0x03fe0000 Bad eraseblock 4091 at 0x03fec000 Bad eraseblock 4092 at 0x03ff0000 Bad eraseblock 4093 at 0x03ff4000 Creating 1 MTD partitions on "NAND 64MiB 3,3V 8-bit": 0x00000000-0x04000000 : "Filesystem on nand" mtd: Giving out device 3 to Filesystem on nand Sarva_mtd->erasesize = 16384 Sarva_mtd->oobblock = 512 Sarva_mtd->oobsize = 16 Sarva_mtd->eccsize = 256 Sarva_chip->page_shift = 9 #[root@Sarva 2.6.13] mount -t yaffs /dev/mtdblock3 /mnt/flash Block scanning block 4089 state 8 seq 0 block 4089 is bad Block scanning block 4090 state 3 seq 0 Block empty Block scanning block 4091 state 3 seq 0 Block empty Block scanning block 4092 state 8 seq 0 block 4092 is bad Block scanning block 4093 state 8 seq 0 block 4093 is bad Block scanning block 4094 state 8 seq 0 block 4094 is bad Block scanning block 4095 state 3 seq 0 Block empty Block scanning block 4096 state 3 seq 0 Block empty yaffs_Scan ends yaffs: yaffs_GutsInitialise() done. yaffs_read_super: guts initialised OK yaffs_read_super: got root inode yaffs_read_super: d_alloc_root done yaffs_read_super: done [root@Sarva 2.6.13]#cat /proc/yaffs YAFFS built:Aug 26 2005 05:54:06 $Id: yaffs_fs.c,v 1.29 2005/08/11 01:07:43 marty Exp $ $Id: yaffs_guts.c,v 1.18 2005/08/16 02:28:04 charles Exp $ Device 0 "Filesystem on nand" startBlock......... 0 endBlock........... 4095 chunkGroupBits..... 2 chunkGroupSize..... 4 nErasedBlocks...... 1537 nTnodesCreated..... 0 nFreeTnodes........ 0 nObjectsCreated.... 100 nFreeObjects....... 96 nFreeChunks........ 49184 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......... 0 isYaffs2........... 0 [root@Sarva 2.6.13]#cp /root/exp/nanddump.c /mnt/flash/ yaffs_mknod: making oject for nanddump.c, mode 81a4 dev 0 yaffs: Tnodes added Allocated block 1, seq 4097, 1536 left Writing chunk 0 tags 261 0 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 1 tags 261 1 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 2 tags 261 2 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 3 tags 261 3 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 4 tags 261 4 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 5 tags 261 5 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 6 tags 261 6 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 7 tags 261 7 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 8 tags 261 8 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Chunk -1 not found zero instead Chunk -1 not found zero instead Chunk -1 not found zero instead Chunk -1 not found zero instead Chunk -1 not found zero instead Chunk -1 not found zero instead Chunk -1 not found zero instead Chunk -1 not found zero instead Writing chunk 9 tags 261 9 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 10 tags 261 10 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 11 tags 261 11 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 12 tags 261 12 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 13 tags 261 13 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Writing chunk 14 tags 261 14 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Chunk -1 not found zero instead Writing chunk 15 tags 261 15 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended Reading data from NAND FLASH without ECC is not recommended Writing chunk 16 tags 261 0 Inside yaffs_WriteChunkWithTagsToNAND<4>Writing data without ECC to NAND-FLASH is not recommended line 2865 delete of chunk 32 Writing chunk 0 tags 0 0 Inside yaffs_WriteChunkWithTagsToNAND<7>yaffs unlocking [root@Sarva 2.6.13]#cat /proc/yaffs YAFFS built:Aug 26 2005 05:54:06 $Id: yaffs_fs.c,v 1.29 2005/08/11 01:07:43 marty Exp $ $Id: yaffs_guts.c,v 1.18 2005/08/16 02:28:04 charles Exp $ Device 0 "Filesystem on nand" startBlock......... 0 endBlock........... 4095 chunkGroupBits..... 2 chunkGroupSize..... 4 nErasedBlocks...... 1536 nTnodesCreated..... 100 nFreeTnodes........ 99 nObjectsCreated.... 100 nFreeObjects....... 95 nFreeChunks........ 49168 nPageWrites........ 18 nPageReads......... 1 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......... 0 isYaffs2........... 0 [root@Sarva 2.6.13]#df Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtdblock2 31488 25080 6408 80% / /dev/mtdblock3 65536 41048 24488 63% /mnt/flash [root@Sarva 2.6.13]#umount /mnt/flash/ yaffs_put_inode: ino 261, count 1 yaffs_put_inode: ino 1, count 1 yaffs_clear_inode: ino 1, count 0 object exists yaffs_clear_inode: ino 261, count 0 object exists [root@Sarva 2.6.13]#mount -t yaffs /dev/mtdblock3 /mnt/flash/ ......... Block scanning block 4094 state 8 seq 0 block 4094 is bad Block scanning block 4095 state 3 seq 0 Block empty Block scanning block 4096 state 3 seq 0 Block empty yaffs_Scan ends yaffs: yaffs_GutsInitialise() done. yaffs_read_super: guts initialised OK yaffs_read_super: got root inode yaffs_read_super: d_alloc_root done yaffs_read_super: done [root@Sarva 2.6.13]#df Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtdblock2 31488 25080 6408 80% / /dev/mtdblock3 65536 41008 24528 63% /mnt/flash [root@Sarva 2.6.13]#cd /mnt/flash/ [root@Sarva flash]#ls yaffs_readdir: starting at 0 yaffs_readdir: starting at 3 lost+found [root@Sarva flash]#cd loyaffs_readdir: starting at 0 yaffs_readdir: starting at 3 st+found/ [root@Sarva lost+found]#ls yaffs_readdir: starting at 0 yaffs_readdir: starting at 2 [root@Sarva lost+found]# Back to where we started :(