summaryrefslogtreecommitdiff
path: root/debuggerd/handler/debuggerd_handler.cpp
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2021-01-19 22:13:37 -0800
committerDavid Anderson <dvander@google.com>2021-01-20 18:17:08 -0800
commit86ba14be168cc50fb46bf130c53cfd9ee8f38a39 (patch)
tree26a95f0c900ada44e87e77b5223af428df791f50 /debuggerd/handler/debuggerd_handler.cpp
parent91c9f56d30a164fafc07db62b2016e8a40c77bcb (diff)
libsnapshot: Use a two-phase merge for VABC.
If a partition shrinks in an update, it must be merged before any other partitions. Otherwise, a copy operation may source from the tail of the shrunk partition, which could be overwritten by a merge operation in another partition. This patch adds a "MergePhase" indicator to the update status that is valid only when the state is MERGING. Partitions that shrink are merged first, and the phase will be FIRST_PHASE. Once ProcessUpdateState() has determined that all first-phase snapshots are merged, it will switch to SECOND_PHASE and remaining snapshots can start merging. Otherwise, there is no change to the merge algorithm. The phase split is an implementation detail and not exposed to update_engine. Bug: 177935716 Test: vts_libsnapshot_test Change-Id: I06043f8e3b81bdecefb6a4b5944a97b7086eeb49
Diffstat (limited to 'debuggerd/handler/debuggerd_handler.cpp')
0 files changed, 0 insertions, 0 deletions