From 34da2061d4e7da874512a50387f0620604cd28c0 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Thu, 27 Feb 2020 11:28:45 -0800 Subject: [PATCH] fs_mgr: remain elapsed time of fsck in prop Bug: 149595111 Bug: 149844577 Bug: 138909685 Signed-off-by: Jaegeuk Kim Change-Id: I8f11ca2680558dc54efd6788ee0dd56e5d65a356 Merged-In: I8f11ca2680558dc54efd6788ee0dd56e5d65a356 --- fs_mgr/fs_mgr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp index 7bc455962..f430fdc98 100644 --- a/fs_mgr/fs_mgr.cpp +++ b/fs_mgr/fs_mgr.cpp @@ -97,6 +97,7 @@ using android::base::Basename; using android::base::GetBoolProperty; using android::base::Realpath; +using android::base::SetProperty; using android::base::StartsWith; using android::base::Timer; using android::base::unique_fd; @@ -178,6 +179,7 @@ static void check_fs(const std::string& blk_device, const std::string& fs_type, return; } + Timer t; /* Check for the types of filesystems we know how to check */ if (is_extfs(fs_type)) { /* @@ -270,7 +272,8 @@ static void check_fs(const std::string& blk_device, const std::string& fs_type, LERROR << "Failed trying to run " << F2FS_FSCK_BIN; } } - + android::base::SetProperty("ro.boottime.init.fsck." + Basename(target), + std::to_string(t.duration().count())); return; }