From e92e110c86a9d3af900435c4222c486d854d8e73 Mon Sep 17 00:00:00 2001 From: yang-jingbo1985 Date: Wed, 6 Mar 2024 17:59:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=85=E5=AD=98=E5=8F=82?= =?UTF-8?q?=E6=95=B0-=E5=A2=9E=E9=87=8F=20Signed-off-by:=20yangjingbo10=20?= =?UTF-8?q??= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia555dc532976ed26e5dc7c33ea9b785c055dcb97 --- .../backup_sa/src/module_ipc/service_incremental.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/backup_sa/src/module_ipc/service_incremental.cpp b/services/backup_sa/src/module_ipc/service_incremental.cpp index ec65795dc..37cc5996a 100644 --- a/services/backup_sa/src/module_ipc/service_incremental.cpp +++ b/services/backup_sa/src/module_ipc/service_incremental.cpp @@ -39,6 +39,7 @@ #include "filemgmt_libhilog.h" #include "ipc_skeleton.h" #include "module_external/bms_adapter.h" +#include "module_external/sms_adapter.h" #include "module_ipc/svc_backup_connection.h" #include "module_ipc/svc_restore_deps_manager.h" #include "parameter.h" @@ -71,6 +72,12 @@ ErrCode Service::Release() HITRACE_METER_NAME(HITRACE_TAG_FILEMANAGEMENT, __PRETTY_FUNCTION__); HILOGI("KILL"); VerifyCaller(session_->GetScenario()); + int32_t oldMemoryParaSize = BConstants::DEFAULT_VFS_CACHE_PRESSURE; + if (session_ != nullptr) { + oldMemoryParaSize = session_->GetMemParaCurSize(); + } + StorageMgrAdapter::UpdateMemPara(oldMemoryParaSize); + HILOGI("Release, set back to oldSize %{public}d", oldMemoryParaSize); SessionDeactive(); return BError(BError::Codes::OK); } @@ -127,6 +134,9 @@ ErrCode Service::InitIncrementalBackupSession(sptr remote) HILOGI("Begin"); try { VerifyCaller(); + int32_t oldSize = StorageMgrAdapter::UpdateMemPara(BConstants::BACKUP_VFS_CACHE_PRESSURE); + HILOGI("InitBackupSession oldSize %{public}d", oldSize); + session_->SetMemParaCurSize(oldSize); session_->Active({.clientToken = IPCSkeleton::GetCallingTokenID(), .scenario = IServiceReverse::Scenario::BACKUP, .clientProxy = remote, -- Gitee