aboutsummaryrefslogtreecommitdiff
path: root/zenstore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-05-01 23:31:35 +0200
committerDan Engelbrecht <[email protected]>2022-05-01 23:31:35 +0200
commit08a0dc388f98e6d3eb8387b983a9a7fb959fe603 (patch)
tree5f4bef8e81e55e22f65690250c84d943098c738b /zenstore/include
parentremove m_TotalSize for blockstore (diff)
downloadzen-08a0dc388f98e6d3eb8387b983a9a7fb959fe603.tar.xz
zen-08a0dc388f98e6d3eb8387b983a9a7fb959fe603.zip
reimplement CasContainerStrategy::Scrub
Diffstat (limited to 'zenstore/include')
-rw-r--r--zenstore/include/zenstore/blockstore.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/zenstore/include/zenstore/blockstore.h b/zenstore/include/zenstore/blockstore.h
index 31d9145f9..5af416b59 100644
--- a/zenstore/include/zenstore/blockstore.h
+++ b/zenstore/include/zenstore/blockstore.h
@@ -99,6 +99,7 @@ struct BlockStoreFile : public RefCounted
void Write(const void* Data, uint64_t Size, uint64_t FileOffset);
void Truncate(uint64_t Size);
void Flush();
+ BasicFile& GetBasicFile();
void StreamByteRange(uint64_t FileOffset, uint64_t Size, std::function<void(const void* Data, uint64_t Size)>&& ChunkFun);
private:
@@ -142,6 +143,9 @@ public:
bool DryRun,
const ReclaimCallback& Callback = [](uint32_t, const std::unordered_map<size_t, BlockStoreLocation>&, const std::vector<size_t>&) {
});
+ void IterateChunks(const std::vector<BlockStoreLocation>& ChunkLocations,
+ std::function<void(size_t ChunkIndex, const void* Data, uint64_t Size)> SmallChunkCallback,
+ std::function<void(size_t ChunkIndex, BasicFile& BlockFile, uint64_t Offset, uint64_t Size)> LargeChunkCallback);
static const char* GetBlockFileExtension();
static std::filesystem::path GetBlockPath(const std::filesystem::path& BlocksBasePath, const uint32_t BlockIndex);