diff options
| author | Stefan Boberg <[email protected]> | 2023-05-15 21:25:18 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2023-05-15 21:25:18 +0200 |
| commit | 51c57171d859f1893d181b68c5a2506f7909578c (patch) | |
| tree | 71694f1f03a86bbcf38f9f0a8253e96dea248ecf /src/zenstore/filecas.cpp | |
| parent | added scrubbing related logging (diff) | |
| download | zen-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.cpp | 8 |
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) { |