diff options
| author | Stefan Boberg <[email protected]> | 2025-03-06 17:35:39 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2025-03-06 17:35:39 +0100 |
| commit | b044289e3c8fbc4eb4ffa5c1d96da51aa0a41f9b (patch) | |
| tree | a511dd945c87415fb5389e6579299095e3f3afc8 /src/zenstore/compactcas.cpp | |
| parent | switched std::vector -> eastl::vector (diff) | |
| download | zen-sb/eastl.tar.xz zen-sb/eastl.zip | |
std::span -> eastl::spansb/eastl
Diffstat (limited to 'src/zenstore/compactcas.cpp')
| -rw-r--r-- | src/zenstore/compactcas.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/zenstore/compactcas.cpp b/src/zenstore/compactcas.cpp index 2e331ab34..e0ed14e14 100644 --- a/src/zenstore/compactcas.cpp +++ b/src/zenstore/compactcas.cpp @@ -226,7 +226,7 @@ CasContainerStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash) } eastl::vector<CasStore::InsertResult> -CasContainerStrategy::InsertChunks(std::span<IoBuffer> Chunks, std::span<IoHash> ChunkHashes) +CasContainerStrategy::InsertChunks(eastl::span<IoBuffer> Chunks, eastl::span<IoHash> ChunkHashes) { ZEN_MEMSCOPE(GetCasContainerTag()); @@ -263,7 +263,7 @@ CasContainerStrategy::InsertChunks(std::span<IoBuffer> Chunks, std::span<IoHash> } size_t ChunkOffset = 0; - m_BlockStore.WriteChunks(Datas, m_PayloadAlignment, [&](std::span<BlockStoreLocation> Locations) { + m_BlockStore.WriteChunks(Datas, m_PayloadAlignment, [&](eastl::span<BlockStoreLocation> Locations) { ZEN_MEMSCOPE(GetCasContainerTag()); eastl::vector<CasDiskIndexEntry> IndexEntries; for (const BlockStoreLocation& Location : Locations) @@ -323,7 +323,7 @@ CasContainerStrategy::FilterChunks(HashKeySet& InOutChunks) } bool -CasContainerStrategy::IterateChunks(std::span<IoHash> ChunkHashes, +CasContainerStrategy::IterateChunks(eastl::span<IoHash> ChunkHashes, const std::function<bool(size_t Index, const IoBuffer& Payload)>& AsyncCallback, WorkerThreadPool* OptionalWorkerPool, uint64_t LargeSizeLimit) @@ -360,7 +360,7 @@ CasContainerStrategy::IterateChunks(std::span<IoHash> ChunkHashes, return true; } - auto DoOneBlock = [&](std::span<const size_t> ChunkIndexes) { + auto DoOneBlock = [&](eastl::span<const size_t> ChunkIndexes) { if (ChunkIndexes.size() < 4) { for (size_t ChunkIndex : ChunkIndexes) @@ -391,7 +391,7 @@ CasContainerStrategy::IterateChunks(std::span<IoHash> ChunkHashes, Latch WorkLatch(1); std::atomic_bool AsyncContinue = true; - bool Continue = m_BlockStore.IterateChunks(FoundChunkLocations, [&](uint32_t BlockIndex, std::span<const size_t> ChunkIndexes) { + bool Continue = m_BlockStore.IterateChunks(FoundChunkLocations, [&](uint32_t BlockIndex, eastl::span<const size_t> ChunkIndexes) { if (OptionalWorkerPool && (ChunkIndexes.size() > 3)) { WorkLatch.AddCount(1); @@ -531,7 +531,7 @@ CasContainerStrategy::ScrubStorage(ScrubContext& Ctx) return true; }; - m_BlockStore.IterateChunks(ChunkLocations, [&](uint32_t, std::span<const size_t> ChunkIndexes) { + m_BlockStore.IterateChunks(ChunkLocations, [&](uint32_t, eastl::span<const size_t> ChunkIndexes) { return m_BlockStore.IterateBlock(ChunkLocations, ChunkIndexes, ValidateSmallChunk, ValidateLargeChunk, 0); }); } @@ -767,9 +767,9 @@ public: NiceTimeSpanMs(Timer.GetElapsedTimeMs())); }); - std::span<IoHash> UnusedCids = GetUnusedReferences(m_Cids); - Stats.CheckedCount = m_Cids.size(); - Stats.FoundCount = UnusedCids.size(); + eastl::span<IoHash> UnusedCids = GetUnusedReferences(m_Cids); + Stats.CheckedCount = m_Cids.size(); + Stats.FoundCount = UnusedCids.size(); if (!Ctx.Settings.CollectSmallObjects) { @@ -1518,7 +1518,7 @@ TEST_CASE("compactcas.threadedinsert") HashKeySet Deleted; GcStats Stats; GcStoreCompactor* Compactor = - Pruner->RemoveUnreferencedData(Ctx, Stats, [&](std::span<IoHash> References) -> std::span<IoHash> { + Pruner->RemoveUnreferencedData(Ctx, Stats, [&](eastl::span<IoHash> References) -> eastl::span<IoHash> { eastl::vector<IoHash> Unreferenced; HashKeySet Retain; Retain.AddHashesToSet(KeepHashes); |