Merge "Log the CowOperation when decompression failed" into main am: e877885533 am: 95879d3e8b

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2768488

Change-Id: I7f026a7662ad580e4e2bb628196749baba2909e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2023-10-02 21:52:30 +00:00 committed by Automerger Merge Worker
commit 176de7bb2e
2 changed files with 3 additions and 2 deletions

View file

@ -103,7 +103,7 @@ bool WorkerThread::ProcessReplaceOp(const CowOperation* cow_op) {
ssize_t rv = reader_->ReadData(cow_op, buffer, BLOCK_SZ);
if (rv != BLOCK_SZ) {
SNAP_LOG(ERROR) << "ProcessReplaceOp failed for block " << cow_op->new_block
<< ", return = " << rv;
<< ", return = " << rv << ", COW operation = " << *cow_op;
return false;
}
return true;

View file

@ -283,7 +283,8 @@ bool ReadWorker::ReadAlignedSector(sector_t sector, size_t sz) {
// We found the sector in mapping. Check the type of COW OP and
// process it.
if (!ProcessCowOp(it->second, buffer)) {
SNAP_LOG(ERROR) << "ProcessCowOp failed";
SNAP_LOG(ERROR)
<< "ProcessCowOp failed, sector = " << sector << ", size = " << sz;
return false;
}