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

Commit 312ad830 authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Randall Huang
Browse files

[DO NOT MERGE] Run check_fs only /data is mounted



After switching to /system from ramdisk, first_stage_init has no required
libraries for check_fs.

[   20.838811][    T1] init: [libfs_mgr]Created logical partition scratch on device /dev/block/dm-6
[   20.972704][    T1] init: [libfs_mgr]Running /system/bin/fsck.f2fs -a -c 10000 --debug-cache /dev/block/dm-6
[   20.977879][  T345] logwrapper: executing /system/bin/fsck.f2fs failed: No such file or directory
[   20.978470][    T1] fsck.f2fs: executing /system/bin/fsck.f2fs failed: No such file or directory
[   20.981137][    T1] fsck.f2fs: fsck.f2fs terminated by exit(255)
[   21.002958][    T1] init: [libfs_mgr]__mount(source=/dev/block/dm-6,target=/mnt/scratch,type=f2fs)=0: Success
[   21.017748][    T1] init: [libfs_mgr]umount(/mnt/scratch)
[   21.021028][    T1] init: [libfs_mgr]Running /system/bin/fsck.f2fs -a -c 10000 --debug-cache /dev/block/dm-6
[   21.028759][  T347] logwrapper: executing /system/bin/fsck.f2fs failed: No such file or directory
[   21.028793][    T1] fsck.f2fs: executing /system/bin/fsck.f2fs failed: No such file or directory
[   21.049100][    T1] fsck.f2fs: fsck.f2fs terminated by exit(255)
[   21.068101][    T1] init: [libfs_mgr]__mount(source=/dev/block/dm-6,target=/mnt/scratch,type=f2fs)=0: Success

Bug: 210589189
Bug: 214203920
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@google.com>
Change-Id: Ie41cba4e7553860fdb48996d9b58a34093f0b723
Merged-In: Ie41cba4e7553860fdb48996d9b58a34093f0b723
parent 9efc42e4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -868,7 +868,10 @@ bool fs_mgr_overlayfs_mount_scratch(const std::string& device_path, const std::s
        entry.flags &= ~MS_RDONLY;
        fs_mgr_set_blk_ro(device_path, false);
    }
    // check_fs requires apex runtime library
    if (fs_mgr_overlayfs_already_mounted("/data", false)) {
        entry.fs_mgr_flags.check = true;
    }
    auto save_errno = errno;
    if (mounted) mounted = fs_mgr_do_mount_one(entry) == 0;
    if (!mounted) {