DescriptionAbort ImportantFileWriter::WriteFileAtomically() on Flush() error.
As discussed on chromium-os-dev [1], if there is no fsync() after writing to the
temp file, atomicity is not guaranteed. Thus, to be able to guarantee
atomicity, we must check the return value of Flush() and bail in case Flush()
wasn't successful.
I'll update the UMA histogram enum in a separate CL.
[1] https://groups.google.com/a/chromium.org/forum/?hl=en#!topic/chromium-os-dev/Eef8gNIRwjc
BUG=none
Committed: https://crrev.com/604e5c185a4f6a9c1a59525a45243e714983262a
Cr-Commit-Position: refs/heads/master@{#300230}
Patch Set 1 #Patch Set 2 : Re-order error handling. #Messages
Total messages: 9 (2 generated)
|