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

Commit 7910ccb5 authored by Frederick Mayle's avatar Frederick Mayle Committed by Android (Google) Code Review
Browse files

Merge "init: skip SnapshotManager steps for microdroid variant" into main

parents 02c98d9d bcc8f940
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -377,7 +377,7 @@ bool FirstStageMountVBootV2::CreateLogicalPartitions() {
        return false;
    }

    if (SnapshotManager::IsSnapshotManagerNeeded()) {
    if (!IsMicrodroid() && SnapshotManager::IsSnapshotManagerNeeded()) {
        auto init_devices = [this](const std::string& device) -> bool {
            if (android::base::StartsWith(device, "/dev/block/dm-")) {
                return block_dev_init_.InitDmDevice(device);
+8 −6
Original line number Diff line number Diff line
@@ -445,8 +445,9 @@ static UmountStat TryUmountAndFsck(unsigned int cmd, bool run_fsck,
    if (run_fsck && !FindPartitionsToUmount(&block_devices, &emulated_devices, false)) {
        return UMOUNT_STAT_ERROR;
    }
    auto sm = snapshot::SnapshotManager::New();
    bool ota_update_in_progress = false;
    if (!IsMicrodroid()) {
        auto sm = snapshot::SnapshotManager::New();
        if (sm->IsUserspaceSnapshotUpdateInProgress(dynamic_partitions)) {
            LOG(INFO) << "OTA update in progress. Pause snapshot merge";
            if (!sm->PauseSnapshotMerge()) {
@@ -454,6 +455,7 @@ static UmountStat TryUmountAndFsck(unsigned int cmd, bool run_fsck,
            }
            ota_update_in_progress = true;
        }
    }
    UmountStat stat = UmountPartitions(timeout - t.duration());
    if (stat != UMOUNT_STAT_SUCCESS) {
        LOG(INFO) << "umount timeout, last resort, kill all and try";