Files
factorio-clusterio/packages/lib
Hornwitser 1b2a20c395 Call fsync on safeOutputFile
If a system crash occurs after a simple write file + rename operation
the target file that was renamed over may end up being empty if the data
for the file written had not yet been committed to disk.  This is
possible because no part of the open file, write data to it, close it
and then rename it ensure the data was actually written to disk prior to
the rename happening. See this discussion on the btrfs wiki[1].

Fix this possible data loss scenario by calling fsync on the temporary
file that is written prior to calling close on it.

[1] https://btrfs.wiki.kernel.org/index.php/FAQ#What_are_the_crash_guarantees_of_overwrite-by-rename.3F
2023-02-16 05:19:04 +01:00
..
2023-02-02 00:28:58 +01:00
2022-09-13 19:15:46 +02:00
2022-01-03 19:45:46 +01:00
2023-02-16 05:19:04 +01:00
2022-09-13 19:15:46 +02:00
2023-02-16 01:22:30 +01:00
2022-07-20 13:30:35 +02:00
2023-02-15 20:31:02 +01:00
2021-11-04 01:39:28 +01:00
2021-12-14 18:44:19 +01:00
2022-08-24 15:42:26 +02:00

Common Library for Clusterio

This package contains functionality shared between master, slave, ctl and/or plugins of Clusterio.

See the Clusterio repository for more information on Clusterio.