[Yaffs] NAND - YAFFS : write file corrupted.

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Deroo Stijn
Date:  
To: yaffs@lists.aleph1.co.uk
Subject: [Yaffs] NAND - YAFFS : write file corrupted.
Hi all,

I'm using YAFFS2 on a NAND flash in our eCOS operating system. We are currently doing some tests on this, but have some strange behavior.
If we write a file to our NAND flash mounted as YAFFS file system, the file is corrupted. What actually happens is that at the end of the file, some extra data is added which doesn't belong there. For example, if we put following file on the flash:


abcdefghijklmnopqrstuvwxyz000
abcdefghijklmnopqrstuvwxyz001
abcdefghijklmnopqrstuvwxyz002
abcdefghijklmnopqrstuvwxyz003
abcdefghijklmnopqrstuvwxyz004
abcdefghijklmnopqrstuvwxyz005
abcdefghijklmnopqrstuvwxyz006
abcdefghijklmnopqrstuvwxyz007
abcdefghijklmnopqrstuvwxyz008
abcdefghijklmnopqrstuvwxyz009
abcdefghijklmnopqrstuvwxyz010
abcdefghijklmnopqrstuvwxyz011
...
...
abcdefghijklmnopqrstuvwxyz1191
abcdefghijklmnopqrstuvwxyz1192
abcdefghijklmnopqrstuvwxyz1193
abcdefghijklmnopqrstuvwxyz1194
abcdefghijklmnopqrstuvwxyz1195
abcdefghijklmnopqrstuvwxyz1196
abcdefghijklmnopqrstuvwxyz1197
abcdefghijklmnopqrstuvwxyz1198
abcdefghijklmnopqrstuvwxyz1199
abcdefghijklmnopqrstuvwxyz1200


And we read the file again, at the end of the file we see following:


...
...
abcdefghijklmnopqrstuvwxyz1196
abcdefghijklmnopqrstuvwxyz1197
abcdefghijklmnopqrstuvwxyz1198
abcdefghijklmnopqrstuvwxyz1199
abcdefghijklmnopqrstuvwxyz1200
yz1155
abcdefghijklmnopqrstuvwxyz1156
abcdefghijklmnopqrstuvwxyz1157
abcdefghijklmnopqrstuvwxyz1158
abcdefghijklmnopqrstuvwxyz1159
abcdefghijklmnopqrstuvwxyz1160
abcdefghijklmnopqrstuvwxyz1161
abcdefghijklmnop



As you can see, at the end of the file, extra data is added. (as of 'yz1155') The new filesize is everytime a multiple of 1448 Bytes (where does this come from???). It's like some data from somewhere in a buffer is added again, while it doesn't belong there.
Does someone has any idea what's going wrong here? Does the problem occur in the NAND driver, or in the YAFFS driver?

Thanks in advance for your help.

Kind regards,
Stijn.


Stijn Deroo-Van Maele
R&D Engineer
Televic Transport Systems
http://www.televic.com
Televic NV/SA (main office)
Leo Bekaertlaan 1
B-8870 Izegem