Author: Louis JANG Date: To: yaffs Subject: [Yaffs] mmap, power-off, and data is lost
Hi all,
I'm using yaffs in several mobile platform, and using mmap interface to
read/write contents of file in yaffs. it works well in normal situation,
but it losts data when I turn off its power without unmount.
Please look at the attached sample code, and the following is its result.
I also waited for about 10 seconds before power off, but data was lost also.
The above problem is not happened if I read mmap_test file before
power-off(I used cat). and it's not happened if I unmount before. I also
have tested the above problem with write api instead of mmap, it was not
happened in this case.