aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/filecas.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-05-15 21:25:18 +0200
committerStefan Boberg <[email protected]>2023-05-15 21:25:18 +0200
commit51c57171d859f1893d181b68c5a2506f7909578c (patch)
tree71694f1f03a86bbcf38f9f0a8253e96dea248ecf /src/zenstore/filecas.cpp
parentadded scrubbing related logging (diff)
downloadzen-51c57171d859f1893d181b68c5a2506f7909578c.tar.xz
zen-51c57171d859f1893d181b68c5a2506f7909578c.zip
added ScrubStorage to GcStorage base class
Diffstat (limited to 'src/zenstore/filecas.cpp')
-rw-r--r--src/zenstore/filecas.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zenstore/filecas.cpp b/src/zenstore/filecas.cpp
index 30c6c2d4d..2b64bd202 100644
--- a/src/zenstore/filecas.cpp
+++ b/src/zenstore/filecas.cpp
@@ -834,6 +834,8 @@ FileCasStrategy::Flush()
void
FileCasStrategy::ScrubStorage(ScrubContext& Ctx)
{
+ ZEN_INFO("scrubbing file CAS @ '{}'", m_RootDirectory);
+
ZEN_ASSERT(m_IsInitialized);
std::vector<IoHash> BadHashes;
@@ -1001,6 +1003,12 @@ FileCasStrategy::CollectGarbage(GcContext& GcCtx)
GcCtx.AddDeletedCids(ChunksToDelete);
}
+GcStorageSize
+FileCasStrategy::StorageSize() const
+{
+ return {.DiskSize = m_TotalSize.load(std::memory_order::relaxed)};
+}
+
bool
FileCasStrategy::ValidateEntry(const FileCasIndexEntry& Entry, std::string& OutReason)
{