3 ms·
My understanding is fsync() will tell you more than close() only when a flush of the OS cache fails to make it to disk. Is there anything else? The problem wi
by rectang 6y ago
My understanding is fsync() will tell you more than close() only when a flush of the OS cache fails to make it to disk. Is there anything else?
The problem with calling fsync() is that you have to wait for it to finish. There are many scenarios where the extra data integrity guarantees you get from calling fsync() aren't important.
- ncmncm 6y agoclose() will fail to report a wide variety of failures. But Cesar is right, you can't re-try it. And fsync() can be very slow on most commonly-used file systems. We are fortunate that now SSDs are fast.
- deleted 6y ago[deleted]