diff --git a/services/storage_daemon/mtpfs/test/mtpfs_tmp_files_pool_test.cpp b/services/storage_daemon/mtpfs/test/mtpfs_tmp_files_pool_test.cpp index ea621f66e8a15ea2ea8685ad2d3713fabe1f25a8..b80ccb61da5420e60b67973696f3b2301505c9e7 100644 --- a/services/storage_daemon/mtpfs/test/mtpfs_tmp_files_pool_test.cpp +++ b/services/storage_daemon/mtpfs/test/mtpfs_tmp_files_pool_test.cpp @@ -48,7 +48,7 @@ public: HWTEST_F(MtpfsTmpFilesPoolTest, MtpfsTmpFilesPoolTest_CreateTmpDir_001, TestSize.Level1) { GTEST_LOG_(INFO) << "MtpfsTmpFilesPoolTest_CreateTmpDir_001 start"; - auto mtptmpfilespool = std::make_shared(); + auto mtptmpfilespool = std::make_shared(); mtptmpfilespool->tmpDir_ = ""; bool result = mtptmpfilespool->CreateTmpDir(); EXPECT_EQ(result, false); @@ -63,7 +63,7 @@ HWTEST_F(MtpfsTmpFilesPoolTest, MtpfsTmpFilesPoolTest_CreateTmpDir_001, TestSize HWTEST_F(MtpfsTmpFilesPoolTest, MtpfsTmpFilesPoolTest_RemoveTmpDir_001, TestSize.Level1) { GTEST_LOG_(INFO) << "MtpfsTmpFilesPoolTest_RemoveTmpDir_001 start"; - auto mtptmpfilespool = std::make_shared(); + auto mtptmpfilespool = std::make_shared(); mtptmpfilespool->tmpDir_ = ""; bool result = mtptmpfilespool->RemoveTmpDir(); EXPECT_EQ(result, false); diff --git a/services/storage_daemon/quota/quota_manager.cpp b/services/storage_daemon/quota/quota_manager.cpp index 69a44c3792abe747a5da8476fc0cd373a6878b82..1c788369ff928c69e2033d51a58b46adc22a5e4e 100644 --- a/services/storage_daemon/quota/quota_manager.cpp +++ b/services/storage_daemon/quota/quota_manager.cpp @@ -108,6 +108,7 @@ static std::string GetQuotaSrcMountPath(const std::string &target) static int64_t GetOccupiedSpaceForUid(int32_t uid, int64_t &size) { + LOGE("GetOccupiedSpaceForUid uid:%{public}d", uid); if (InitialiseQuotaMounts() != true) { LOGE("Failed to initialise quota mounts"); return E_SYS_ERR; @@ -127,11 +128,13 @@ static int64_t GetOccupiedSpaceForUid(int32_t uid, int64_t &size) } size = static_cast(dq.dqb_curspace); + LOGE("GetOccupiedSpaceForUid size:%{public}s", std::to_string(size).c_str()); return E_OK; } static int64_t GetOccupiedSpaceForGid(int32_t gid, int64_t &size) { + LOGE("GetOccupiedSpaceForGid gid:%{public}d", gid); if (InitialiseQuotaMounts() != true) { LOGE("Failed to initialise quota mounts"); return E_SYS_ERR; @@ -151,12 +154,14 @@ static int64_t GetOccupiedSpaceForGid(int32_t gid, int64_t &size) } size = static_cast(dq.dqb_curspace); + LOGE("GetOccupiedSpaceForGid size:%{public}s", std::to_string(size).c_str()); return E_OK; } static int64_t GetOccupiedSpaceForPrjId(int32_t prjId, int64_t &size) { + LOGE("GetOccupiedSpaceForPrjId prjId:%{public}d", prjId); if (InitialiseQuotaMounts() != true) { LOGE("Failed to initialise quota mounts"); return E_SYS_ERR; @@ -176,6 +181,7 @@ static int64_t GetOccupiedSpaceForPrjId(int32_t prjId, int64_t &size) } size = static_cast(dq.dqb_curspace); + LOGE("GetOccupiedSpaceForPrjId size:%{public}s", std::to_string(size).c_str()); return E_OK; } diff --git a/services/storage_manager/storage/src/storage_status_service.cpp b/services/storage_manager/storage/src/storage_status_service.cpp index a475bfbdfa2bfc61ef12d542d60a3954d7231b74..e6ab7d9ed0219b6af81be164e5c73003277a6137 100644 --- a/services/storage_manager/storage/src/storage_status_service.cpp +++ b/services/storage_manager/storage/src/storage_status_service.cpp @@ -94,7 +94,7 @@ void GetMediaTypeAndSize(const std::shared_ptr &r int32_t GetMediaStorageStats(StorageStats &storageStats) { HITRACE_METER_NAME(HITRACE_TAG_FILEMANAGEMENT, __PRETTY_FUNCTION__); - LOGI("GetMediaStorageStats start"); + LOGE("GetMediaStorageStats start"); #ifdef STORAGE_SERVICE_GRAPHIC auto sam = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); if (sam == nullptr) { @@ -107,6 +107,7 @@ int32_t GetMediaStorageStats(StorageStats &storageStats) return E_REMOTE_IS_NULLPTR; } int32_t tryCount = 1; + LOGE("GetMediaStorageStats start Creator"); auto dataShareHelper = DataShare::DataShareHelper::Creator(remoteObj, MEDIALIBRARY_DATA_URI); while (dataShareHelper == nullptr && tryCount < GET_DATA_SHARE_HELPER_TIMES) { LOGW("dataShareHelper is retrying, attempt %{public}d", tryCount); @@ -120,6 +121,7 @@ int32_t GetMediaStorageStats(StorageStats &storageStats) vector columns; Uri uri(MEDIALIBRARY_DATA_URI + "/" + MEDIA_QUERYOPRN_QUERYVOLUME + "/" + MEDIA_QUERYOPRN_QUERYVOLUME); DataShare::DataSharePredicates predicates; + LOGE("GetMediaStorageStats start Query"); auto queryResultSet = dataShareHelper->Query(uri, predicates, columns); if (queryResultSet == nullptr) { LOGE("queryResultSet is null!"); @@ -134,20 +136,20 @@ int32_t GetMediaStorageStats(StorageStats &storageStats) GetMediaTypeAndSize(queryResultSet, storageStats); dataShareHelper->Release(); #endif - LOGI("GetMediaStorageStats end"); + LOGE("GetMediaStorageStats end"); return E_OK; } int32_t GetFileStorageStats(int32_t userId, StorageStats &storageStats) { HITRACE_METER_NAME(HITRACE_TAG_FILEMANAGEMENT, __PRETTY_FUNCTION__); - LOGI("GetFileStorageStats start"); + LOGE("GetFileStorageStats start"); int32_t err = E_OK; int32_t prjId = userId * USER_ID_BASE + UID_FILE_MANAGER; std::shared_ptr sdCommunication; sdCommunication = DelayedSingleton::GetInstance(); err = sdCommunication->GetOccupiedSpace(StorageDaemon::USRID, prjId, storageStats.file_); - LOGI("GetFileStorageStats end"); + LOGE("GetFileStorageStats end"); return err; }