From 18d10d4c15baed1e5f6dd17743589f0928c5048b Mon Sep 17 00:00:00 2001 From: Satoshi Futenma Date: Mon, 25 Mar 2019 23:13:36 +0900 Subject: [PATCH] Fixed min_free_bytes prop name and usleep time default Test: check build Bug: 129299864 Change-Id: Iab6a01d15185dd19604cd8d3d7ea4efc2b020e34 --- Checkpoint.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Checkpoint.cpp b/Checkpoint.cpp index 1a89039..3392be5 100644 --- a/Checkpoint.cpp +++ b/Checkpoint.cpp @@ -262,7 +262,7 @@ bool cp_needsCheckpoint() { namespace { const std::string kSleepTimeProp = "ro.sys.cp_usleeptime"; -const uint32_t usleeptime_default = 1000; // 1 s +const uint32_t usleeptime_default = 1000000; // 1 s const std::string kMinFreeBytesProp = "ro.sys.cp_min_free_bytes"; const uint64_t min_free_bytes_default = 100 * (1 << 20); // 100 MiB @@ -274,7 +274,8 @@ static void cp_healthDaemon(std::string mnt_pnt, std::string blk_device, bool is struct statvfs data; uint64_t free_bytes = 0; uint32_t usleeptime = GetUintProperty(kSleepTimeProp, usleeptime_default, (uint32_t)-1); - uint64_t min_free_bytes = GetUintProperty(kSleepTimeProp, min_free_bytes_default, (uint64_t)-1); + uint64_t min_free_bytes = + GetUintProperty(kMinFreeBytesProp, min_free_bytes_default, (uint64_t)-1); bool commit_on_full = GetBoolProperty(kCommitOnFullProp, commit_on_full_default); while (isCheckpointing) {