about ubifs

Corentin Chary corentin.chary at gmail.com
Fri Jun 5 10:04:38 EDT 2009

On Fri, Jun 5, 2009 at 3:03 PM, tommy<jiujin.hong at mid-fun.com> wrote:
> no,i didn't fsync when i close file !
> did ubifs driver can achieve "fsync" when user modify some file and
> close with save ?

For critical data, you need to call fsync to be sure the data is
stored on the flash.
There is also a "sync" option for ubifs, but this will hurt performance a lot.

> if system have no power and shutdown system forcely ,user's file will
> become no contents in some case ,how did we protect this ?

What does the application do ?
Only open - write - close ? Do you also rename files ?
I believe that the content should not disapear when you only do a write.

You can activate ubifs debug to check if there is more informations.

Corentin Chary
http://xf.iksaif.net - http://uffs.org

More information about the linux-mtd mailing list