Fix missing label ops during cow size estimation am: 2931bee8b1
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2166206
Change-Id: I3995fca471089e17a30d0e235c2c3365f31551e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/payload_generator/cow_size_estimator.cc b/payload_generator/cow_size_estimator.cc
index 3a23f44..5326d13 100644
--- a/payload_generator/cow_size_estimator.cc
+++ b/payload_generator/cow_size_estimator.cc
@@ -106,14 +106,15 @@
cow_writer->AddLabel(0);
}
for (const auto& op : operations) {
+ cow_writer->AddLabel(0);
if (op.type() == InstallOperation::ZERO) {
for (const auto& ext : op.dst_extents()) {
visited.AddExtent(ext);
cow_writer->AddZeroBlocks(ext.start_block(), ext.num_blocks());
}
- cow_writer->AddLabel(0);
}
}
+ cow_writer->AddLabel(0);
const size_t last_block = partition_size / block_size;
const auto unvisited_extents =
FilterExtentRanges({ExtentForRange(0, last_block)}, visited);