From 24f960986b1337f14eb8e86382cb62aed5d1153c Mon Sep 17 00:00:00 2001 From: Tianjie Date: Tue, 30 Jun 2020 12:26:25 -0700 Subject: 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 --- common/dynamic_partition_control_interface.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'common/dynamic_partition_control_interface.h') diff --git a/common/dynamic_partition_control_interface.h b/common/dynamic_partition_control_interface.h index 7289deee..7c2d0b0c 100644 --- a/common/dynamic_partition_control_interface.h +++ b/common/dynamic_partition_control_interface.h @@ -130,6 +130,13 @@ class DynamicPartitionControlInterface { // the result in |path|. Returns true on success. // Sample result: /dev/block/by-name/ virtual bool GetDeviceDir(std::string* path) = 0; + + // Verifies that the untouched dynamic partitions in the target metadata have + // the same extents as the source metadata. + virtual bool VerifyExtentsForUntouchedPartitions( + uint32_t source_slot, + uint32_t target_slot, + const std::vector& partitions) = 0; }; } // namespace chromeos_update_engine -- cgit v1.2.3