Re: [Yaffs] yaffs2 with onenand on kerenel 35 issue

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] yaffs2 with onenand on kerenel 35 issue
On Friday 03 December 2010 19:09:35 Xiaoguang Chen wrote:
> Hi
> We have an issue when mounting yaffs image on onenand with kernel 35, after
> mount, only "lost+found" in the mounted directory.


Is there anything inside lost+found?

> We tried to add new
> files in the mounted directory, and checked the new file is indeed written
> to onenand flash. But after umount and mount again, the new file is lost
> and again "lost + found" is the only thing .


If you just write the file then read it back then the file is most likely just
being read from the page cache and not from nand.

You can clear out the cache as follows:

.. write files..
echo 3 > /proc/sys/vm/drop_caches
.. read files


> We suspect whether it's
> onenand driver's problem or yaffs's problem. so we tried to replace all
> yaffs files in drivers/fs/yaffs2 in kernel 35 with kernel 32 yaffs files,
> and this time the mount has no problem at all. Mount/umount both will
> succeed. So maybe it's something that yaffs changed from .32 to .35, but
> we didn't noticed.


Yaffs is not really connected to a Linux version. There have been some changes
in that timeframe which make a difference.

The older code will use file headers that had ECC errors where the newer code
will reject those headers.

I suggest you have a very good look at the mtd layer to ensure that you are
not getting ECC corruptions. THat is the most likely cause of problems of
this sort.

-- CHarles