diff options
| author | Dan Engelbrecht <[email protected]> | 2022-05-02 11:01:12 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-05-02 11:01:12 +0200 |
| commit | 80a39f97f465465466ccd2d5914421db55efb80e (patch) | |
| tree | 891a826b28a17c908ef29ffb45109dfccf27c561 /zenstore/include | |
| parent | use std::vector<std::pair>> instead of map (diff) | |
| download | zen-80a39f97f465465466ccd2d5914421db55efb80e.tar.xz zen-80a39f97f465465466ccd2d5914421db55efb80e.zip | |
add back gc space reclaim call
Diffstat (limited to 'zenstore/include')
| -rw-r--r-- | zenstore/include/zenstore/blockstore.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zenstore/include/zenstore/blockstore.h b/zenstore/include/zenstore/blockstore.h index 17f4e090e..28f0a5541 100644 --- a/zenstore/include/zenstore/blockstore.h +++ b/zenstore/include/zenstore/blockstore.h @@ -120,6 +120,7 @@ public: typedef std::function<void(const std::vector<std::pair<size_t, BlockStoreLocation>>& MovedChunks, const std::vector<size_t>& RemovedChunks)> ReclaimCallback; + typedef std::function<uint64_t()> ClaimGCReserveCallback; typedef std::function<void(const BlockStoreLocation& Location)> WriteChunkCallback; typedef std::function<void(size_t ChunkIndex, const void* Data, uint64_t Size)> IterateChunksSmallSizeCallback; typedef std::function<void(size_t ChunkIndex, BasicFile& BlockFile, uint64_t Offset, uint64_t Size)> IterateChunksLargeSizeCallback; @@ -144,7 +145,9 @@ public: const std::vector<size_t>& KeepChunkIndexes, uint64_t PayloadAlignment, bool DryRun, - const ReclaimCallback& Callback = [](const std::vector<std::pair<size_t, BlockStoreLocation>>&, const std::vector<size_t>&) {}); + const ReclaimCallback& ChangeCallback = [](const std::vector<std::pair<size_t, BlockStoreLocation>>&, + const std::vector<size_t>&) {}, + const ClaimGCReserveCallback& GcReserveCallback = []() { return 0; }); void IterateChunks(const std::vector<BlockStoreLocation>& ChunkLocations, IterateChunksSmallSizeCallback SmallSizeCallback, IterateChunksLargeSizeCallback LargeSizeCallback); |