Verify the extents for untouched dynamic partitions during partial update
For partial updates, the metadata for untouched dynamic partitions
are just copied over to the target slot. So, verifying the extents
of these partitions in the target metadata should be sufficient for
correctness. This saves the work to read & hash the bytes on these
partitions for each resumed update.
Bug: 151088567
Test: unit tests pass, apply a partial update
Change-Id: I9d40ed2643e145a1546ea17b146fcdcfb91f213f
diff --git a/common/dynamic_partition_control_stub.h b/common/dynamic_partition_control_stub.h
index 28e3e6a..94dba1b 100644
--- a/common/dynamic_partition_control_stub.h
+++ b/common/dynamic_partition_control_stub.h
@@ -51,6 +51,11 @@
bool ListDynamicPartitionsForSlot(
uint32_t current_slot, std::vector<std::string>* partitions) override;
bool GetDeviceDir(std::string* path) override;
+
+ bool VerifyExtentsForUntouchedPartitions(
+ uint32_t source_slot,
+ uint32_t target_slot,
+ const std::vector<std::string>& partitions) override;
};
} // namespace chromeos_update_engine