Fsync data after writing prefs
update_engine is relying on prefs stored on filesystem to resume OTA
progress. Partners report loss of update progress after forced reboot.
This might be I/O cache issue.
Test: th
Bug: 259174530
Change-Id: I7b4b8281cfe2cc45c51e4d6d60e09edb12f3ed86
diff --git a/aosp/dynamic_partition_control_android.cc b/aosp/dynamic_partition_control_android.cc
index cb38506..7818086 100644
--- a/aosp/dynamic_partition_control_android.cc
+++ b/aosp/dynamic_partition_control_android.cc
@@ -1314,8 +1314,8 @@
// ResetUpdateProgress may pass but CancelUpdate fails.
// This is expected. A scheduled CleanupPreviousUpdateAction should free
// space when it is done.
- TEST_AND_RETURN_FALSE(DeltaPerformer::ResetUpdateProgress(
- prefs, false /* quick */, false /* skip dynamic partitions metadata */));
+ TEST_AND_RETURN_FALSE(
+ DeltaPerformer::ResetUpdateProgress(prefs, false /* quick */));
if (ExpectMetadataMounted()) {
TEST_AND_RETURN_FALSE(snapshot_->CancelUpdate());