-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.macosIssues and PRs related to the macOS platform / OSX.Issues and PRs related to the macOS platform / OSX.
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.
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.libuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.macosIssues and PRs related to the macOS platform / OSX.Issues and PRs related to the macOS platform / OSX.