DescriptionDo fcntl(...F_FULLFSYNC...) on mac instead of fsync
From mac's fsync man page:
For applications that require tighter guarantees about the integrity of their
data, Mac OS X provides the F_FULLFSYNC fcntl. The F_FULLFSYNC fcntl asks the
drive to flush all buffered data to permanent storage. Applications, such as
databases, that require a strict ordering of writes should use F_FULLFSYNC to
ensure that their data is written in the order they expect.
Also, specifically check for a return value of -1 from fdatasync. mac's fcntl
only guarantees to return -1 on error and something other than -1 on success.
All other platforms agree to return -1 on error for fsync/fdatasync/_commit.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221413
Patch Set 1 #
Total comments: 3
Messages
Total messages: 7 (0 generated)
|