diff options
Diffstat (limited to 'src/zenstore/filecas.cpp')
| -rw-r--r-- | src/zenstore/filecas.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/zenstore/filecas.cpp b/src/zenstore/filecas.cpp index 0088afe6e..b254d06ab 100644 --- a/src/zenstore/filecas.cpp +++ b/src/zenstore/filecas.cpp @@ -315,7 +315,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash, CasStore:: // File-based chunks have special case handling whereby we move the file into // place in the file store directory, thus avoiding unnecessary copying - if (MoveToFile(ChunkPath, Chunk)) + if (std::error_code MoveEc = MoveToFile(ChunkPath, Chunk); !MoveEc) { bool IsNew = UpdateIndex(ChunkHash, Chunk.Size()); return CasStore::InsertResult{.New = IsNew}; @@ -337,7 +337,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash, CasStore:: if (Mode == CasStore::InsertMode::kMayBeMovedInPlace) { - if (MoveToFile(ChunkPath, Chunk)) + if (std::error_code MoveEc = MoveToFile(ChunkPath, Chunk); !MoveEc) { bool IsNew = UpdateIndex(ChunkHash, Chunk.Size()); return CasStore::InsertResult{.New = IsNew}; @@ -1231,7 +1231,7 @@ public: ZEN_MEMSCOPE(GetFileCasTag()); ZEN_TRACE_CPU("FileCas::CompactStore"); - auto Log = [&Ctx]() { return Ctx.Logger; }; + ZEN_SCOPED_LOG(Ctx.Logger); Stopwatch Timer; const auto _ = MakeGuard([&] { @@ -1375,7 +1375,7 @@ public: ZEN_MEMSCOPE(GetFileCasTag()); ZEN_TRACE_CPU("FileCas::RemoveUnreferencedData"); - auto Log = [&Ctx]() { return Ctx.Logger; }; + ZEN_SCOPED_LOG(Ctx.Logger); Stopwatch Timer; const auto _ = MakeGuard([&] { @@ -1458,7 +1458,7 @@ FileCasStrategy::CreateReferencePruner(GcCtx& Ctx, GcReferenceStoreStats&) ZEN_TRACE_CPU("FileCas::CreateReferencePruner"); - auto Log = [&Ctx]() { return Ctx.Logger; }; + ZEN_SCOPED_LOG(Ctx.Logger); Stopwatch Timer; const auto _ = MakeGuard([&] { |