I would like to ask a fundamental question about when it is useful to use a system call like fsync. I am starting, and I always got the impression that writing is enough to write to a file, and samples that use writing are actually written to the file at the end.
So what is the purpose of a fsync type system call?
Just to provide some background, I use the Berkeley DB library version 5.1.19, and there is a lot of talk about the cost of fsync () and just writing. That is why I am wondering.
source
share