Click here to Skip to main content
15,891,845 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have an 2 MB spi nor flash. It has jffs2 filesystem on it with size of 1 MB. Here is the steps for deploying jffs2


flash erase -j /dev/mtd10 0 0
mount -t jffs2 /dev/mtdblock10 /root/rootfs_rarely_rw


Then some important stuffs stored there. Normally everything is just fine and working properly. But somehow, some times this filesystem gets corrupted or only some of files in it gets corrupted.

Do you have any idea how to prevent this corruptions ?



Thanks.
Posted
Comments
Richard MacCutchan 15-May-13 4:04am    
Are you sure it gets unmounted properly before you remove it from the system? Remember that data gets flushed to devices in a lazy manner.
_rfk 15-May-13 6:33am    
Actually sync command is called right after almost all write attempts. But in some cases a file that we even dont write (only read) is gets corrupted. As it is known, jffs2 is tend to corrupt in case of a power cut during access. But in our case it is so frequent that I dont think that the reason is power cut.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900