Fix for compaction vma batch not consuming after first send

This wrong condition causes it to only send the first batch in full
however, if the batch was not processed in full by process madvise
then it would bail out instead of resending at starting failure point.

Bug: 237600211
Test: am compact full <package> <uid>
Change-Id: Ibe8e8ecd7ff97a856e533363f6b7ded318968889
Merged-In: Ibe8e8ecd7ff97a856e533363f6b7ded318968889
(cherry picked from commit 7f464fc7b0)
This commit is contained in:
Edgar Arriaga
2022-07-19 19:23:09 +00:00
committed by Edgar Arriaga García
parent d184d81f55
commit c3686f7f0b

View File

@@ -113,7 +113,7 @@ uint64_t consumeBytes(VmaBatch& batch, uint64_t bytesToConsume) {
uint64_t bytesConsumed = 0;
while (bytesConsumed < bytesToConsume) {
if (CC_UNLIKELY(batch.totalVmas > 0)) {
if (CC_UNLIKELY(batch.totalVmas == 0)) {
// No more vmas to consume
break;
}