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

Commit bbad87ae authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

Mount /mnt/scracth with -o sync,nodiscard



"-o discard" issues UNMAP commands to loopback resulting in punch_hole
on the pinned file in /data. That will break the pinned block map.

Bug: 210589189
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@google.com>
Change-Id: Ia927c43fc75164ce5929173f5740737eac4de484
parent 06db803f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -880,6 +880,8 @@ bool fs_mgr_overlayfs_mount_scratch(const std::string& device_path, const std::s
            errno = save_errno;
        }
        entry.flags &= ~MS_RDONLY;
        entry.flags |= MS_SYNCHRONOUS;
        entry.fs_options = "nodiscard";
        fs_mgr_set_blk_ro(device_path, false);
    }
    // check_fs requires apex runtime library