Generate SOURCE_COPY and ZERO operations beyond the end of the filesystem.
This patch analyzes the whole partition size, regardless of what the
size of the filesystem in the partition is. This makes the blocks in
the ext2 partitions past the end of the filesystem (normally verity
hashes) be compared against the old blocks and produce SOURCE_COPY
operations for those as well if possible.
Bug: 29272878
TEST=Generated a payload to itself of a build with verity hashes, only
SOURCE_COPY (and REPLACE_BZ of zeroed blocks) are produced.
Change-Id: If7f2733da41c333d4a8247b1473ad06fb63466d6
diff --git a/payload_generator/delta_diff_utils.cc b/payload_generator/delta_diff_utils.cc
index de6a23d..137a77b 100644
--- a/payload_generator/delta_diff_utils.cc
+++ b/payload_generator/delta_diff_utils.cc
@@ -183,8 +183,8 @@
aops,
old_part.path,
new_part.path,
- old_part.fs_interface ? old_part.fs_interface->GetBlockCount() : 0,
- new_part.fs_interface->GetBlockCount(),
+ old_part.size / kBlockSize,
+ new_part.size / kBlockSize,
soft_chunk_blocks,
version,
blob_file,