diff options
| author | Dan Engelbrecht <[email protected]> | 2022-05-02 11:03:04 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-05-02 11:11:54 +0200 |
| commit | 10690e805f45a590094a659c8e1f6482d12aaf8e (patch) | |
| tree | 42aac794a1fcd723530aa0f2bc4940f095ece673 /zenstore/compactcas.cpp | |
| parent | add back gc space reclaim call (diff) | |
| download | zen-10690e805f45a590094a659c8e1f6482d12aaf8e.tar.xz zen-10690e805f45a590094a659c8e1f6482d12aaf8e.zip | |
cleanup
Diffstat (limited to 'zenstore/compactcas.cpp')
| -rw-r--r-- | zenstore/compactcas.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/zenstore/compactcas.cpp b/zenstore/compactcas.cpp index 5734a16b6..ade6a7daf 100644 --- a/zenstore/compactcas.cpp +++ b/zenstore/compactcas.cpp @@ -345,11 +345,6 @@ CasContainerStrategy::Scrub(ScrubContext& Ctx) std::vector<IoHash> BadKeys; - // We do a read sweep through the payloads file and validate - // any entries that are contained within each segment, with - // the assumption that most entries will be checked in this - // pass. An alternative strategy would be to use memory mapping. - m_BlockStore.IterateChunks( ChunkLocations, [&ChunkIndexToChunkHash, &BadKeys](size_t ChunkIndex, const void* Data, uint64_t Size) { @@ -443,7 +438,7 @@ CasContainerStrategy::CollectGarbage(GcContext& GcCtx) } std::vector<BlockStoreLocation> ChunkLocations; - std::vector<size_t> KeepChunkIndexes; + BlockStore::ChunkIndexArray KeepChunkIndexes; std::vector<IoHash> ChunkIndexToChunkHash; ChunkLocations.reserve(TotalChunkCount); ChunkIndexToChunkHash.reserve(TotalChunkCount); @@ -477,8 +472,8 @@ CasContainerStrategy::CollectGarbage(GcContext& GcCtx) m_PayloadAlignment, false, [this, &DeletedChunks, &ChunkIndexToChunkHash, &LocationMap, &ReadBlockTimeUs, &ReadBlockLongestTimeUs]( - const std::vector<std::pair<size_t, BlockStoreLocation>>& MovedChunks, - const std::vector<size_t>& RemovedChunks) { + const BlockStore::MovedChunksArray& MovedChunks, + const BlockStore::ChunkIndexArray& RemovedChunks) { std::vector<CasDiskIndexEntry> LogEntries; LogEntries.reserve(MovedChunks.size() + RemovedChunks.size()); for (const auto& Entry : MovedChunks) @@ -849,7 +844,7 @@ CasContainerStrategy::MigrateLegacyData(bool CleanSource) m_PayloadAlignment, CleanSource, [this, &LegacyDiskIndex, &ChunkIndexToChunkHash, &LegacyCasLog, &CasLog, CleanSource, &MigratedBlockCount, &MigratedChunkCount]( - const std::vector<std::pair<size_t, BlockStoreLocation>>& MovedChunks) { + const BlockStore::MovedChunksArray& MovedChunks) { std::vector<CasDiskIndexEntry> LogEntries; LogEntries.reserve(MovedChunks.size()); for (const auto& Entry : MovedChunks) |