Closed
Description
I tried looking in the Node
and libuv
source but was unable to confirm whether fs.fsync()
does in fact do F_FULLFSYNC
on darwin
?
According to http://xiayubin.com/blog/2014/06/20/does-fsync-ensure-data-persistency-when-disk-cache-is-enabled/ as of 14.04 Ubuntu has moved to a stronger fsync
that includes writing through or flushing a disk cache if present
.
To do this on darwin
requires F_FULLFSYNC
. Otherwise a Node app may call fsync
with nothing actually being flushed to disk on darwin
systems.
Obviously, fsync
will always be broken on older operating systems, but at least the tendency is to move towards making stronger guarantees, not the other way round.