fsync, sync: does it really do what its supposed to? [closed]

一世执手 提交于 2019-12-04 03:01:59

问题


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?


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!