diff options
author | Yifan Hong <elsk@google.com> | 2020-02-20 19:51:05 -0800 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2020-03-03 13:19:49 -0800 |
commit | 44b93df30053871ff6f95445c936d624a9cd6122 (patch) | |
tree | e8f2573949d951d98211120745c5775baf23861f /trusty/coverage/coverage.cpp | |
parent | e256e3b7d444ac079c6b87abb5331d82cb4ad4a8 (diff) |
libsnapshot: remove snapshots properly after flashing
If updated then immediately flashed target slot at unverified
stage, update_engine attempts to call RemoveAllSnapshots, but
it used to fail because unmapping fails. In reality, these devices
are dm-linear targets, so unmapping them is optional.
- Introduce a GetSnapshotFlashingStatus function that expose more
information than AreAllSnapshotsCancelled. We can use the returned
map<string, bool> to determine whether a partition is flashed or
not.
- Introduce ShouldUnmapDeleteSnapshot which determines whether
unmapping / deleteting a snapshot is needed in RemoveAllSnapshots.
Test: apply OTA, flash target slot, then inspect logs
Bug: 147696014
Change-Id: I0853d1e213566af2a3401e46fac7d9586cee7aaf
Diffstat (limited to 'trusty/coverage/coverage.cpp')
0 files changed, 0 insertions, 0 deletions