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

Commit a133690f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "fs_mgr: overlayfs: noatime"

parents 059b8dac 808763e8
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -713,7 +713,7 @@ bool fs_mgr_overlayfs_mount(const std::string& mount_point) {
    }
    }
    report = report + ")=";
    report = report + ")=";


    auto ret = mount("overlay", mount_point.c_str(), "overlay", MS_RDONLY | MS_RELATIME,
    auto ret = mount("overlay", mount_point.c_str(), "overlay", MS_RDONLY | MS_NOATIME,
                     options.c_str());
                     options.c_str());
    if (ret) {
    if (ret) {
        retval = false;
        retval = false;
@@ -776,7 +776,7 @@ bool fs_mgr_overlayfs_mount_scratch(const std::string& device_path, const std::s
    entry.fs_type = mnt_type;
    entry.fs_type = mnt_type;
    if ((mnt_type == "f2fs") && !f2fs) entry.fs_type = "ext4";
    if ((mnt_type == "f2fs") && !f2fs) entry.fs_type = "ext4";
    if ((mnt_type == "ext4") && !ext4) entry.fs_type = "f2fs";
    if ((mnt_type == "ext4") && !ext4) entry.fs_type = "f2fs";
    entry.flags = MS_RELATIME;
    entry.flags = MS_NOATIME;
    if (readonly) {
    if (readonly) {
        entry.flags |= MS_RDONLY;
        entry.flags |= MS_RDONLY;
    } else {
    } else {
+5 −0
Original line number Original line Diff line number Diff line
@@ -1190,6 +1190,11 @@ if ${overlayfs_needed}; then
    skip_unrelated_mounts |
    skip_unrelated_mounts |
    grep " overlay ro,") ||
    grep " overlay ro,") ||
    die "remount overlayfs missed a spot (ro)"
    die "remount overlayfs missed a spot (ro)"
  !(adb_sh grep -v noatime /proc/mounts </dev/null |
    skip_administrative_mounts data |
    skip_unrelated_mounts |
    grep '.') ||
    die "mounts are not noatime"
  D=`adb_sh grep " rw," /proc/mounts </dev/null |
  D=`adb_sh grep " rw," /proc/mounts </dev/null |
     skip_administrative_mounts data`
     skip_administrative_mounts data`
  if echo "${D}" | grep /dev/root >/dev/null; then
  if echo "${D}" | grep /dev/root >/dev/null; then