I would like to have more clarification on the functionality of sync(8) and fsync functions in Linux (2.6.31). Does it make sure the files are written to the respective storage?
Oliver
http://linux.die.net/man/8/sync
It does not make sure that files are written to respective storage. It only makes sure that cached/buffered data is flushed to the disk device. It doesn't matter if this is an SD Card or whatever.
来源:https://stackoverflow.com/questions/12262454/fsync-sync-does-it-really-do-what-its-supposed-to