diff options
| author | Stefan Boberg <[email protected]> | 2021-09-19 23:19:06 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-19 23:19:06 +0200 |
| commit | 3cf9dedfd08fe4d7a049e51b14a937f7a34afce3 (patch) | |
| tree | d68b5203818665f6f54aceea586f550dc6aadca4 /zenstore/include | |
| parent | Added BasicFile::StreamFile helper function to support reading large files in... (diff) | |
| download | zen-3cf9dedfd08fe4d7a049e51b14a937f7a34afce3.tar.xz zen-3cf9dedfd08fe4d7a049e51b14a937f7a34afce3.zip | |
Implemended basic scrubbing / detection of disk corruption. Still needs more code to propagate errors and make adjustments to account for them in higher level data structures
Diffstat (limited to 'zenstore/include')
| -rw-r--r-- | zenstore/include/zenstore/CAS.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/zenstore/include/zenstore/CAS.h b/zenstore/include/zenstore/CAS.h index c6c919593..bb310b179 100644 --- a/zenstore/include/zenstore/CAS.h +++ b/zenstore/include/zenstore/CAS.h @@ -37,6 +37,14 @@ public: private: }; +class ScrubContext +{ +public: + virtual void ReportBadChunks(std::span<IoHash> BadChunks); + +private: +}; + class CasChunkSet { public: @@ -54,17 +62,7 @@ class CasStore public: virtual ~CasStore() = default; - struct Stats - { - uint64_t PutBytes = 0; - uint64_t PutCount = 0; - - uint64_t GetBytes = 0; - uint64_t GetCount = 0; - }; - const CasStoreConfiguration& Config() { return m_Config; } - const Stats& GetStats() const { return m_Stats; } struct InsertResult { @@ -76,11 +74,10 @@ public: virtual IoBuffer FindChunk(const IoHash& ChunkHash) = 0; virtual void FilterChunks(CasChunkSet& InOutChunks) = 0; virtual void Flush() = 0; - virtual void Scrub() = 0; + virtual void Scrub(ScrubContext& Ctx) = 0; protected: CasStoreConfiguration m_Config; - Stats m_Stats; }; ZENCORE_API CasStore* CreateCasStore(); |