You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't thing consistency in the face of a kernel panic or power failure is a requirement based on how that code is used. Adding 2 fsyncs to every file creation would just slow builds down.
@JustinAzoff The problem is if I don't put these two fsyncs, the program fails. It complaints that the file is missing when the file is created but the directory is not fsync.
I think this code is not atomic.
gg/src/util/path.cc
Lines 188 to 209 in febdf22
Two fsync is missing. You need to fsync the temp file and fsync the containing directory after the rename. See: https://lwn.net/Articles/457667/
The text was updated successfully, but these errors were encountered: