[Yaffs] scan problem or bug??

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Abhishek Bhattacharya
Date:  
To: yaffs
Subject: [Yaffs] scan problem or bug??

Hi
Working with yaffs2 I have faced a strange problem. Intially to
initialise the file system, i make a call to
yaffs_StartUp() and then yaffs_mount("/flash"). I am only using flash
device.

Following this I create files, which are successfully created. To see
the created files I use dumpDir("/flash"),
which clearly shows the created file and the size. All is fine upto this
stage!

But problem starts, once I restart the system and try to reinitialize.
Well once I do this , the return messages
show that all blocks starting from START BLOCK to END BLOCK are empty. (
Even though previously we have created
a file of 1 MB). Next after this if I call dumpDir("/flash") I get only
lost+found dir, and the previously created file is simply gone.

But the funny thing is that , when I try to create another file after
reinitalization, it actually allocates a chunk which is the next
chunk from the last chunk used ( Suppose last chunk used was X, then the
next chunk allocated will be X+1), which is a correct
behaviour.

Now I have seen , that in yaffs_Scan() we
yaffs_QueryInitialBlockState(), inside which the state is always
returned as EMPTY.
Therefore every time you scan all blocks definetely turn up as EMPTY,
and though there exists data in the flash, it shows 0 files
and complete flash as empty!

Moreover this was never a problem with yaffs1, since every time i reboot
I used to reinitialize using the same sequence, and I used
to get all files and directories intact!

Does yaffs2 expect only one intialisation? If so what about reboots??

Is this a bug??? Or am I missing something while reinitalizing?

Regards
Abhishek


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

This email message is for the sole use of the intended recipient(s)and may contain CONFIDENTIAL and PRIVILEGED information.
LG Soft India will not be responsible for any viruses or defects or any forwarded attachments emanating either from within
LG Soft India or outside. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender By reply email and destroy all copies of the original message.

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