Add COW version to the update_metadata.proto am: 3632df977f am: 2b10c92256
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1675042
Change-Id: Iaf1f77f7ff78ee775d4f21dd6a6343b637b012ce
diff --git a/payload_generator/payload_generation_config.cc b/payload_generator/payload_generation_config.cc
index d45de6a..2cd2ebc 100644
--- a/payload_generator/payload_generation_config.cc
+++ b/payload_generator/payload_generation_config.cc
@@ -23,6 +23,7 @@
#include <base/logging.h>
#include <base/strings/string_number_conversions.h>
#include <brillo/strings/string_utils.h>
+#include <libsnapshot/cow_format.h>
#include "update_engine/common/utils.h"
#include "update_engine/payload_consumer/delta_performer.h"
@@ -185,6 +186,7 @@
// We use "gz" compression by default for VABC.
if (metadata->vabc_enabled()) {
metadata->set_vabc_compression_param("gz");
+ metadata->set_cow_version(android::snapshot::kCowVersionManifest);
}
dynamic_partition_metadata = std::move(metadata);
return true;
diff --git a/update_metadata.proto b/update_metadata.proto
index bc9e34a..93e4e2e 100644
--- a/update_metadata.proto
+++ b/update_metadata.proto
@@ -359,6 +359,10 @@
// See system/core/fs_mgr/libsnapshot/cow_writer.cpp for available options,
// as this parameter is ultimated forwarded to libsnapshot's CowWriter
optional string vabc_compression_param = 4;
+
+ // COW version used by VABC. The represents the major version in the COW
+ // header
+ optional uint32 cow_version = 5;
}
// Definition has been duplicated from