summaryrefslogtreecommitdiff
path: root/services/incremental/IncrementalService.h
diff options
context:
space:
mode:
author Alex Buynytskyy <alexbuy@google.com> 2021-03-14 22:20:20 -0700
committer Alex Buynytskyy <alexbuy@google.com> 2021-03-16 04:12:21 +0000
commitd7aa3464da4b2fe52ae59df88635c1d0733d988e (patch)
treeebee17f23a6ba45847221d505d62830449ae7a25 /services/incremental/IncrementalService.h
parentc7a5fdd81c2d6da97bd98b46be7451f5f062f2a5 (diff)
Limit read log reporting to 2hrs for non-system DLs (non-adb).
Bug: 182477087 Test: atest IncrementalServiceTest Change-Id: I98c9ed3a2e8a91d26bcb879ab7073903ff7bb2c5
Diffstat (limited to 'services/incremental/IncrementalService.h')
-rw-r--r--services/incremental/IncrementalService.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/services/incremental/IncrementalService.h b/services/incremental/IncrementalService.h
index 4eb513808342..bc441c792084 100644
--- a/services/incremental/IncrementalService.h
+++ b/services/incremental/IncrementalService.h
@@ -231,6 +231,7 @@ private:
MountId id() const { return mId.load(std::memory_order_relaxed); }
const content::pm::DataLoaderParamsParcel& params() const { return mParams; }
+ bool isSystemDataLoader() const;
void setHealthListener(StorageHealthCheckParams&& healthCheckParams,
const StorageHealthListener* healthListener);
long elapsedMsSinceOldestPendingRead();
@@ -330,6 +331,7 @@ private:
StorageMap storages;
BindMap bindPoints;
DataLoaderStubPtr dataLoaderStub;
+ TimePoint startLoadingTs = {};
std::atomic<int> nextStorageDirNo{0};
const IncrementalService& incrementalService;
@@ -348,12 +350,7 @@ private:
void disallowReadLogs() { flags &= ~StorageFlags::ReadLogsAllowed; }
int32_t readLogsAllowed() const { return (flags & StorageFlags::ReadLogsAllowed); }
- void setReadLogsEnabled(bool value) {
- if (value)
- flags |= StorageFlags::ReadLogsEnabled;
- else
- flags &= ~StorageFlags::ReadLogsEnabled;
- }
+ void setReadLogsEnabled(bool value);
int32_t readLogsEnabled() const { return (flags & StorageFlags::ReadLogsEnabled); }
static void cleanupFilesystem(std::string_view root);
@@ -411,6 +408,8 @@ private:
IncFsMount::StorageMap::const_iterator storageIt,
std::string_view path) const;
int makeDirs(const IncFsMount& ifs, StorageId storageId, std::string_view path, int mode);
+
+ int setStorageParams(IncFsMount& ifs, StorageId storageId, bool enableReadLogs);
binder::Status applyStorageParams(IncFsMount& ifs, bool enableReadLogs);
int isFileFullyLoadedFromPath(const IncFsMount& ifs, std::string_view filePath) const;