summaryrefslogtreecommitdiff
path: root/scripts/update_payload/format_utils.py
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2019-03-28 14:42:53 -0700
committerYifan Hong <elsk@google.com>2019-04-01 14:37:39 -0700
commit8546a717e5389bb9cb5067f4eb139520802a7537 (patch)
tree87c6c575572cee5bcc5642d22fde4e2fa4e9bfce /scripts/update_payload/format_utils.py
parentaff17cf2087cc7c89c1cab75660398fd30d6066c (diff)
Fix resuming updates on DAP launch devices.
On devices that launch with dynamic partitions, the following sequence may occur: - update started (assume current_slot = A) - super partition metadata slot B initialized - device rebooted - init maps system_b from extents in metadata slot A - update is resumed, but system_b has wrong extents now InitPartitionMetadata is not called when update is resumed, hence system_b is not unmapped before GetDynamicPartitionDevice is called. The new logic for GetDynamicPartitionDevice is as follows: if (slot == current_slot && partition is mapped) { return GetDmDevicePathByName } return MapPartitionOnDeviceMapper The new logic for MapPartitionOnDeviceMapper is as follows: if (not mapped) return CreateLogicalPartition; if (mapped) { if (mapped by update_engine) { return GetDmDevicePathByName; } DestroyLogicalPartition; return CreateLogicalPartition; } Test: start OTA, see partition metadata initialized, reboot and resume OTA Test: update_engine_unittests Fixes: 129292271 Change-Id: If0b541e9aa42a7f462c1061c67750cf360e42732
Diffstat (limited to 'scripts/update_payload/format_utils.py')
0 files changed, 0 insertions, 0 deletions