Hi,
During development of a new embedded platform I have run into an unwanted behaviour by yaffs.
We use yaffs in direct mode on an micron SLC nand with 2k pages and built-in ECC functionality.
It seems like yaffs sometimes roll back the file system when it is mounted, even if there should be no checkpoint available.
We see this by noticing that sometimes after a sudden reboot / crash files are rollbacked to previous versions.
I was under the impression that the checkpoint is invalidated immediately when a partition is mounted, but this may not be the case?
Our current method to avoid this is to call yaffs_sync() after every file operation, which doesn’t seems like the right way to do it.
yaffs_sync() both does a full sync including checkpoint.
replacing the calls to yaffs_sync() with yaffs_sync_files()