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

Commit c9a4c17a authored by Akilesh Kailash's avatar Akilesh Kailash Committed by Automerger Merge Worker
Browse files

Merge changes I779184f1,I241ee11d into sc-qpr1-dev am: d6383199

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

Change-Id: I1eb2a86623258bf10081f908bfc3b6187b244e93
parents b6e9ccea d6383199
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -518,6 +518,13 @@ bool SnapshotManager::MapSnapshot(LockedFile* lock, const std::string& name,
            break;
            break;
    }
    }


    if (mode == SnapshotStorageMode::Persistent && status.state() == SnapshotState::MERGING) {
        LOG(ERROR) << "Snapshot: " << name
                   << " has snapshot status Merging but mode set to Persistent."
                   << " Changing mode to Snapshot-Merge.";
        mode = SnapshotStorageMode::Merge;
    }

    DmTable table;
    DmTable table;
    table.Emplace<DmTargetSnapshot>(0, snapshot_sectors, base_device, cow_device, mode,
    table.Emplace<DmTargetSnapshot>(0, snapshot_sectors, base_device, cow_device, mode,
                                    kSnapshotChunkSize);
                                    kSnapshotChunkSize);
@@ -886,6 +893,10 @@ bool SnapshotManager::QuerySnapshotStatus(const std::string& dm_name, std::strin
    if (target_type) {
    if (target_type) {
        *target_type = DeviceMapper::GetTargetType(target.spec);
        *target_type = DeviceMapper::GetTargetType(target.spec);
    }
    }
    if (!status->error.empty()) {
        LOG(ERROR) << "Snapshot: " << dm_name << " returned error code: " << status->error;
        return false;
    }
    return true;
    return true;
}
}