libsnapshot: v3 structural changes
Changes to structure of v3 header + operation needed for variable block
size. Seperating this CL from the variable block size one so we can get
v3 enabled on cuttlefish
the op count type changes are so that op count matches the type of
max_blocks. Max_blocks is used when op buffer size is not set -> we
default to upper bound of one operation per block in the partition.
Test: th
Bug: 307452468
Change-Id: I1a2581763a4fd6be5d5795f7e4781023e9984256
diff --git a/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h b/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h
index 9401c66..d410c14 100644
--- a/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h
+++ b/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h
@@ -101,7 +101,7 @@
// monotonically increasing value used by update_engine
uint64_t label;
// Index of last CowOperation guaranteed to be resumable
- uint32_t op_index;
+ uint64_t op_index;
} __attribute__((packed));
static constexpr uint8_t kNumResumePoints = 4;
@@ -115,10 +115,12 @@
uint32_t resume_point_max;
// Number of CowOperationV3 structs in the operation buffer, currently and total
// region size.
- uint32_t op_count;
- uint32_t op_count_max;
+ uint64_t op_count;
+ uint64_t op_count_max;
// Compression Algorithm
uint32_t compression_algorithm;
+ // Max compression size supported
+ uint32_t max_compression_size;
} __attribute__((packed));
enum class CowOperationType : uint8_t {
@@ -203,7 +205,7 @@
struct CowOperationV3 {
// If this operation reads from the data section of the COW, this contains
// the length.
- uint16_t data_length;
+ uint32_t data_length;
// The block of data in the new image that this operation modifies.
uint32_t new_block;