summaryrefslogtreecommitdiff
path: root/payload_generator/payload_properties_unittest.cc
diff options
context:
space:
mode:
authorTianjie <xunchang@google.com>2020-08-11 11:13:54 -0700
committerTianjie Xu <xunchang@google.com>2020-08-27 20:15:12 +0000
commite9156ec8de400e24602bd08a06a02b4a47c76c7f (patch)
tree4709d48c4be35a4dc121525922d0f56032f59756 /payload_generator/payload_properties_unittest.cc
parent1f4964213f67ae682af8cd332cd37b3d9afdbace (diff)
Add CowMergeOperations as a hint for snapshot write
As proposed in http://go/vabc, we want to reduce the cow size for VAB. One nature apporach is to skip writing the idential blocks to snapshot; instead we can read from the souce blocks. Similiar to the non-A/B update schema, we need to compute a sequence for snapshot merge to avoid the read after write problem. If there is a circular dependency, we will omit some blocks in the result sequence to break the cycles. So libsnapshot will write the raw data of these blocks to cow. All extents in the CowMergeOperations are subsets of a particular OTA SOURCE_COPY InstallOperation. Also, these src & ext extents will be contiguous to improve the libsnapshot read performance before merge completes, as well as to simplify the sequence generation. Bug: 162274240 Test: unittest pass, genertes an OTA Change-Id: I12c952593d83a8e34a0a6cff5a2066c9103a0d30
Diffstat (limited to 'payload_generator/payload_properties_unittest.cc')
-rw-r--r--payload_generator/payload_properties_unittest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/payload_generator/payload_properties_unittest.cc b/payload_generator/payload_properties_unittest.cc
index db3902ce..e0072fc6 100644
--- a/payload_generator/payload_properties_unittest.cc
+++ b/payload_generator/payload_properties_unittest.cc
@@ -98,7 +98,7 @@ class PayloadPropertiesTest : public ::testing::Test {
EXPECT_TRUE(strategy->GenerateOperations(
config, old_part, new_part, &blob_file_writer, &aops));
- payload.AddPartition(old_part, new_part, aops);
+ payload.AddPartition(old_part, new_part, aops, {});
uint64_t metadata_size;
EXPECT_TRUE(payload.WritePayload(