diff options
author | Wei Wang <wvw@google.com> | 2019-04-01 18:27:21 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-04-01 18:27:21 -0700 |
commit | d7676a33fba14c03cdd1467193a96beccbe901f4 (patch) | |
tree | 40bab317f4436f2e91fb735524dba69fea662078 | |
parent | 2f3beb5690279b2fa48fc488b4a55b817d5d82ef (diff) | |
parent | 17226e5ef69bd8b8326fc2cb9a8cfd5140ac17ae (diff) | |
download | extras-d7676a33fba14c03cdd1467193a96beccbe901f4.tar.gz |
Merge "Use fsync instead of sync during first boot" am: 654a37cd65 am: d603390bed
am: 17226e5ef6
Change-Id: I4ad0e370ace2e6f24df93a8581ce753bb4a84617
-rw-r--r-- | cppreopts/cppreopts.rc | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | cppreopts/cppreopts.sh | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/cppreopts/cppreopts.rc b/cppreopts/cppreopts.rc index 812b4ce8..60bd66ca 100644 --- a/cppreopts/cppreopts.rc +++ b/cppreopts/cppreopts.rc @@ -16,6 +16,9 @@ service cppreopts /system/bin/cppreopts.sh /postinstall oneshot disabled user root + priority -20 + ioprio rt 0 + writepid /dev/cpuset/foreground/tasks capabilities # Post install is above Treble VINTF, because it runs some utilities from diff --git a/cppreopts/cppreopts.sh b/cppreopts/cppreopts.sh index a3545e17..3416e675 100644..100755 --- a/cppreopts/cppreopts.sh +++ b/cppreopts/cppreopts.sh @@ -28,11 +28,12 @@ function do_copy() { log -p w -t cppreopts "Unable to copy file ${source_file} to ${temp_dest_name}!" else log -p i -t cppreopts "Copied file from ${source_file} to ${temp_dest_name}" - sync + fsync ${temp_dest_name} if ! mv ${temp_dest_name} ${dest_name} ; then log -p w -t cppreopts "Unable to rename temporary file from ${temp_dest_name} to ${dest_name}" rm ${temp_dest_name} || log -p w -t cppreopts "Unable to remove temporary file ${temp_dest_name}" else + fsync ${dest_name} log -p i -t cppreopts "Renamed temporary file from ${temp_dest_name} to ${dest_name}" fi fi |