Hi Charles,

Thanks for your advise. The problem is solved. That is the problem with mtd driver, since mtd driver do the hardware ECC so that yaffs tag is written incorrectly. I just disable the hardware ECC in mtd driver and the yaffs works well now.
Just wonder if i can disable the ECC of yaffs and enable the ECC of mtd driver ? I have try this but it is unsuccessful b/c of incorrect tag.

Thanks
Tung

--- On Wed, 2/3/10, yaffs-request@lists.aleph1.co.uk <yaffs-request@lists.aleph1.co.uk> wrote:

From: yaffs-request@lists.aleph1.co.uk <yaffs-request@lists.aleph1.co.uk>
Subject: yaffs Digest, Vol 57, Issue 3
To: yaffs@lists.aleph1.co.uk
Date: Wednesday, February 3, 2010, 7:00 AM


Today's Topics:

   1. Re: mout problem with yaffs (Charles Manning)
   2. Re: YAFFS2 Memory Usage Redux (Charles Manning)
   3. Re: multithreading question (Charles Manning)
   4. YAFFS struct dentry *old_dentry...in static int yaffs_link. (???)
   5. Re: multithreading question (Johan Kotlinski)


----------------------------------------------------------------------

Message: 1
Date: Wed, 3 Feb 2010 12:41:30 +1300
From: Charles Manning <manningc2@actrix.gen.nz>
Subject: Re: [Yaffs] mout problem with yaffs
To: yaffs@lists.aleph1.co.uk
Message-ID: <201002031241.30997.manningc2@actrix.gen.nz>
Content-Type: text/plain;  charset="utf-8"

On Monday 01 February 2010 19:51:01 Tung Dang wrote:
> Hi all,
>
> I am getting the mount problem with yaffs2, i can successfully mount a Nand
> block device as yaffs2 format, write some files to it, edit, save , review
> and every thing is ok. But the problem comes when i reboot the system or
> unmount/mount again, the whole data that i wrote before was lost. I am
> using the lastest version of yaffs2 from cvs.
> Any one experience with this prolem ? what is wrong with me ?
> Pls advise !

The most likely issue is that the tags are not being written and restored
correctly due to an issue in the mtd.

I suggest two things:
1) Turn on more tracing in both yaffs and mtd to see if this helps.  Google
for yaffs tracing to see how to do that.

2) Starting with an erased flash, just write a small file and see what the
nand contents looks like.

-- Charles


************************************