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/compactcas.h | |
| 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/compactcas.h')
| -rw-r--r-- | src/zenstore/compactcas.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/zenstore/compactcas.h b/src/zenstore/compactcas.h index eebe3e7d2..b149fd682 100644 --- a/src/zenstore/compactcas.h +++ b/src/zenstore/compactcas.h @@ -39,11 +39,11 @@ struct CasDiskIndexEntry static_assert(sizeof(CasDiskIndexEntry) == 32); /** This implements a storage strategy for small CAS values - * - * New chunks are simply appended to a small object file, and an index is - * maintained to allow chunks to be looked up within the active small object - * files - * + + New chunks are simply appended to a small object file, and an index is + maintained to allow chunks to be looked up within the active small object + files + */ struct CasContainerStrategy final : public GcStorage @@ -61,9 +61,12 @@ struct CasContainerStrategy final : public GcStorage uint64_t Alignment, bool IsNewStore); void Flush(); - void ScrubStorage(ScrubContext& Ctx); - virtual void CollectGarbage(GcContext& GcCtx) override; - virtual GcStorageSize StorageSize() const override { return {.DiskSize = m_BlockStore.TotalSize()}; } + + // GcStorage + + virtual void ScrubStorage(ScrubContext& ScrubCtx) override; + virtual void CollectGarbage(GcContext& GcCtx) override; + virtual GcStorageSize StorageSize() const override; private: CasStore::InsertResult InsertChunk(const void* ChunkData, size_t ChunkSize, const IoHash& ChunkHash); |