AU: fix bug with identical src/dst block removal
We've been seeing a few payloads failing to verify due to a perceived
discrepancy between the number of blocks the file appears to occupy and
its reported size. This is due to the recent removal of identical
src/dst blocks from MOVE operations; unfortunately, I neglected to
adjust the src_len/dst_len fields of the operation when removing blocks
from extents.
Note that in deducting the length we need to pay attention to the last
block, which may not be filled with data.
BUG=chromium:263550
TEST=Unit tests adjusted to ensure the said invariant is preserved.
Change-Id: I1dd1a9d23b722d39ab7f24de35e3478ba7dfca8e
Reviewed-on: https://chromium-review.googlesource.com/182284
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
2 files changed