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

Issue 663463002: Abort ImportantFileWriter::WriteFileAtomically() on Flush() error. (Closed)

Created:
6 years, 2 months ago by Thiemo Nagel
Modified:
6 years, 2 months ago
CC:
chromium-reviews, tfarina, erikwright+watch_chromium.org, Chris Masone
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Abort 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
M base/files/important_file_writer.cc View 1 3 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 9 (2 generated)
Thiemo Nagel
Hi Ricardo, could you please take a look? Thank you! Thiemo
6 years, 2 months ago (2014-10-16 09:13:38 UTC) #2
rvargas (doing something else)
I have a question: The CL looks strictly speaking correct, but I wonder if it ...
6 years, 2 months ago (2014-10-17 23:03:24 UTC) #3
rvargas (doing something else)
On 2014/10/17 23:03:24, rvargas wrote: > I have a question: The CL looks strictly speaking ...
6 years, 2 months ago (2014-10-17 23:05:46 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/663463002/20001
6 years, 2 months ago (2014-10-20 06:50:24 UTC) #6
Thiemo Nagel
On 2014/10/17 23:05:46, rvargas wrote: > I have a question: The CL looks strictly speaking ...
6 years, 2 months ago (2014-10-20 06:55:45 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
6 years, 2 months ago (2014-10-20 09:31:15 UTC) #8
commit-bot: I haz the power
6 years, 2 months ago (2014-10-20 09:32:24 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/604e5c185a4f6a9c1a59525a45243e714983262a
Cr-Commit-Position: refs/heads/master@{#300230}

Powered by Google App Engine
This is Rietveld 408576698