|
|
|
|
|
by tsimionescu
1088 days ago
|
|
It's fun to remember that fsync() on Linux on ext4 at least offers no real guarantee that the data was successfully written to disk. This happens when write errors from background buffered writes are handled internally by the kernel, and they cleanup the error situation (mark dirty pages clean etc). Since the kernel can't know if a later call to fsync() will ever happen, it can't just keep the error around. So, when the call does happen, it will not return any error code. I don't know for sure, but msync() may well have the same behavior. Here is an LWN article discussing the whole problem as the Postgres team found out about it. https://lwn.net/Articles/752063/ |
|