Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab4c9621 authored by Kelvin Zhang's avatar Kelvin Zhang
Browse files

Log the CowOperation when decompression failed

Test: th
Bug: 302992208
Change-Id: I617062d75a79ae73dfdff13c2e9d2a62c5dfcfc0
parent b4987345
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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;
                }