Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: third_party/leveldatabase/env_chromium.cc

Issue 23538008: Revert "Do fcntl(...F_FULLFSYNC...) on mac instead of fsync" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/leveldatabase/env_chromium.cc
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index 413f230508ee155235f4557dfa299c01b896d1d1..97f6c8ef4c16aeba8a7da11230dc8bee85111c04 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -68,8 +68,6 @@ int fflush_wrapper(FILE *file) {
int fdatasync(int fildes) {
#if defined(OS_WIN)
return _commit(fildes);
-#elif defined(OS_MACOSX)
- return HANDLE_EINTR(fcntl(fildes, F_FULLFSYNC, 0));
#else
return HANDLE_EINTR(fsync(fildes));
#endif
@@ -517,7 +515,7 @@ Status ChromiumWritableFile::Sync() {
error = errno;
// Sync even if fflush gave an error; perhaps the data actually got out,
// even though something went wrong.
- if (fdatasync(fileno(file_)) == -1 && !error)
+ if (fdatasync(fileno(file_)) && !error)
error = errno;
// Report the first error we found.
if (error) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698