summaryrefslogtreecommitdiff
path: root/libutils/ProcessCallStack.cpp
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2018-07-11 17:08:22 -0700
committerDavid Anderson <dvander@google.com>2018-07-11 17:14:12 -0700
commita5cb671e94f71b2ed8c94316abe09ce33508d035 (patch)
tree3958f818ba1a09302e84e50272c620878ec9266f /libutils/ProcessCallStack.cpp
parentc457df7d34afbc4f96e5351ef5ae3d15381167ec (diff)
liblp: Improve reliability of UpdatePartitionTable.
If UpdatePartitionTable is interrupted while writing metadata, the next update becomes much more risky, as only one valid copy may exist. If that subsequent update is interrupted, all metadata copies may be corrupt. To alleviate this, we now synchronize both metadata copies before each update. If the backup copy is corrupted, we replace it with the primary copy, and vice versa. Similarly if the primary and backup metadata do not match, we sync the backup to contain the same data as the primary. If for some reason this synchronization process fails, we do not proceed to write a new partition table. Bug: 79173901 Test: liblp_test gtest Change-Id: Ic80cf9a5dc6336ff532e069ca5c8c76371550cb9
Diffstat (limited to 'libutils/ProcessCallStack.cpp')
0 files changed, 0 insertions, 0 deletions