--- ./source/private_module/util/task_timer.c	2018-02-09 13:47:03.000000000 +0000
+++ ./source/private_module/util/task_timer.c.hotpatch	2022-03-21 06:29:12.000000000 +0000
@@ -24,13 +24,13 @@
 #include "task_timer.h"
 #include "task_timer_inner.h"
 #include "task_timer_diagnose.h"
-
+#include <util/customize.h>
 #include <vol_subsys.h>
 MODULE_ID(PID_SPACE_SCHED);
 
 /** ʹȼУһִʱ ڲʹһѣĿ O(log n) */
 #define TASK_TIMER_TICK_IN_MS 500        /* ʱ500Ms */
-
+#define UPDATE_CAPACITY_CONFIG_CYCLE     (60000)
 #define SPACE_BEGIN_TASK_ID 1  /* IDʼֵ */
 
 
@@ -41,7 +41,7 @@
 
 /***********************ȫֱ**************************************/
 bool g_spaceDebugSwitch  = 0;
-
+uint64_t g_readCfgCnt = 0;
 BGR_TASK_SCHED_INFO g_bgrTaskSchedInfo;
 
 
@@ -647,7 +647,7 @@
 
     return RETURN_OK;
 }
-
+void updateCapacityCfg(void);
 void trigTaskScheduler(void *arg)
 {
     REQ_S* req = NULL;
@@ -692,7 +692,7 @@
     req->ops = &g_spaceTimerReqOps;
 
     IOD_ADD_STARTQ(req);
-
+    updateCapacityCfg();
     return;
 }
 
@@ -1228,3 +1228,38 @@
 EXPORT_SYMBOL(setSpaceTaskType);
 EXPORT_SYMBOL(setSpaceTaskPriority);
 
+extern bool g_spaceCorrectSwitch;
+void updateCapacityCfg(void)
+{
+    uint32_t readCfgCycle;
+    CST_ITEM_T item;
+    uint32_t spaceCorrectSwitch = 0;
+
+    /* ÿ1ӶһļԸ */
+    readCfgCycle = UPDATE_CAPACITY_CONFIG_CYCLE / TASK_TIMER_TICK_IN_MS;
+
+    g_readCfgCnt++;
+
+    if (0 == g_readCfgCnt % readCfgCycle)
+    {
+        memset(&item, 0, sizeof(CST_ITEM_T));
+        if (FALSE == CST_GetItem("SPECIFICATION", "SpaceCorrectSwitch", &item))
+        {
+            DBG_LogDebug(DBG_LOGID_NEW, "Get space correct switch failed.\n");
+        }
+        else
+        {
+            spaceCorrectSwitch = (uint32_t)LVOS_StrToU64(item.acValue);
+            DBG_LogDebug(DBG_LOGID_NEW, "Space correct switch : %u\n", spaceCorrectSwitch);
+        }
+
+        if (g_spaceCorrectSwitch != (bool)spaceCorrectSwitch)
+        {
+            DBG_LogInfo(DBG_LOGID_NEW, "Update correct switch from %d to %d.\n", g_spaceCorrectSwitch, spaceCorrectSwitch);
+            g_spaceCorrectSwitch = (bool)spaceCorrectSwitch;
+        }
+    }
+
+    return;
+}
+
--- ./source/private_module/util/util_main.c	2018-02-09 13:47:03.000000000 +0000
+++ ./source/private_module/util/util_main.c.hotpatch	2022-03-21 06:29:12.000000000 +0000
@@ -1625,3 +1625,35 @@
 module_init(initVolsUtilModule)
 module_exit(exitVolsUtilModule)
 
+extern OSP_S32 ECONF_ModifyConfig(OSP_CHAR *v_szSectionName, OSP_CHAR *v_szItemName, OSP_CHAR *v_szItemValue);
+bool g_spaceCorrectSwitch = FALSE;
+#define CST_MAX_VALUE_LEN (256 + 1)
+void setSpaceCorrectSwitch(bool switchVal)
+{
+    int32_t result = RETURN_OK;
+    bool oldSwitch = g_spaceCorrectSwitch;
+    int8_t value[CST_MAX_VALUE_LEN] = {0};
+
+    snprintf(value, CST_MAX_VALUE_LEN, "%u", (uint32_t)switchVal);
+
+    result = ECONF_ModifyConfig("SPECIFICATION", "SpaceCorrectSwitch", value);
+    if (RETURN_OK != result)
+    {
+        DBG_PrintBuf("Set space correct switch to %d failed, result(%d).\n", switchVal, result);
+        return;
+    }
+    
+    g_spaceCorrectSwitch = switchVal;
+    DBG_PrintBuf("Set space correct switch from %d to %d success.\n", oldSwitch, g_spaceCorrectSwitch);
+    DBG_LogInfo(0, "Set space correct switch from %d to %d success.", oldSwitch, g_spaceCorrectSwitch);
+    
+    return;
+}
+EXPORT_SYMBOL(setSpaceCorrectSwitch);
+
+bool getSpaceCorrectSwitch(void)
+{
+    return g_spaceCorrectSwitch;
+}
+EXPORT_SYMBOL(getSpaceCorrectSwitch);
+
