aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/filecas.h
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-10-20 11:02:26 +0200
committerGitHub <[email protected]>2023-10-20 11:02:26 +0200
commit57f054be2f4f68d0d52631838655a45855c33655 (patch)
tree4a768d8eee548c1c4c002388e48da3d62850dc02 /src/zenstore/filecas.h
parentAdd --skip-delete option to gc command (#484) (diff)
downloadzen-57f054be2f4f68d0d52631838655a45855c33655.tar.xz
zen-57f054be2f4f68d0d52631838655a45855c33655.zip
clean up GcContributor and GcStorage to be pure interfaces (#485)
Diffstat (limited to 'src/zenstore/filecas.h')
-rw-r--r--src/zenstore/filecas.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/zenstore/filecas.h b/src/zenstore/filecas.h
index 10c181c0b..ea7ff8e8c 100644
--- a/src/zenstore/filecas.h
+++ b/src/zenstore/filecas.h
@@ -45,9 +45,10 @@ struct FileCasStrategy final : public GcStorage
virtual GcStorageSize StorageSize() const override;
private:
- void MakeIndexSnapshot();
- uint64_t ReadIndexFile(const std::filesystem::path& IndexPath, uint32_t& OutVersion);
- uint64_t ReadLog(const std::filesystem::path& LogPath, uint64_t LogPosition);
+ void MakeIndexSnapshot();
+ uint64_t ReadIndexFile(const std::filesystem::path& IndexPath, uint32_t& OutVersion);
+ uint64_t ReadLog(const std::filesystem::path& LogPath, uint64_t LogPosition);
+ spdlog::logger& Log() { return m_Log; }
struct IndexEntry
{
@@ -57,12 +58,12 @@ private:
CasStore::InsertResult InsertChunkData(const void* ChunkData, size_t ChunkSize, const IoHash& ChunkHash);
+ spdlog::logger& m_Log;
+ GcManager& m_Gc;
std::filesystem::path m_RootDirectory;
RwLock m_Lock;
IndexMap m_Index;
RwLock m_ShardLocks[256]; // TODO: these should be spaced out so they don't share cache lines
- spdlog::logger& m_Log;
- spdlog::logger& Log() { return m_Log; }
std::atomic_uint64_t m_TotalSize{};
bool m_IsInitialized = false;