diff options
| author | Dan Engelbrecht <[email protected]> | 2022-03-16 12:28:32 +0100 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-03-31 11:28:32 +0200 |
| commit | 4218385c5f50a3469150d5e3e26e9c50a48d5f2e (patch) | |
| tree | 8ef2782d99371475264978b879e0c4328d295891 /zenstore/compactcas.cpp | |
| parent | Moved ChunkBlock to be internal class (diff) | |
| download | zen-4218385c5f50a3469150d5e3e26e9c50a48d5f2e.tar.xz zen-4218385c5f50a3469150d5e3e26e9c50a48d5f2e.zip | |
clang format
Diffstat (limited to 'zenstore/compactcas.cpp')
| -rw-r--r-- | zenstore/compactcas.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/zenstore/compactcas.cpp b/zenstore/compactcas.cpp index 8204e5731..25ba497ad 100644 --- a/zenstore/compactcas.cpp +++ b/zenstore/compactcas.cpp @@ -94,8 +94,8 @@ private: }; CasContainerStrategy::ChunkBlock::ChunkBlock(const std::filesystem::path& RootDirectory, - const std::string_view ContainerBaseName, - uint16_t BlockIndex) + const std::string_view ContainerBaseName, + uint16_t BlockIndex) : m_Path(BuildUcasPath(RootDirectory, ContainerBaseName, BlockIndex)) { } @@ -850,10 +850,10 @@ namespace { { static const uint8_t kTombstone = 0x01; - IoHash Key; + IoHash Key; LegacyCasDiskLocation Location; - ZenContentType ContentType = ZenContentType::kUnknownContentType; - uint8_t Flags = 0; + ZenContentType ContentType = ZenContentType::kUnknownContentType; + uint8_t Flags = 0; }; } // namespace @@ -889,7 +889,7 @@ CasContainerStrategy::OpenContainer(bool IsNewStore) if (std::filesystem::exists(LegacySobsPath)) { ZEN_INFO("migrating store {} from {} to chunks", m_Config.RootDirectory / m_ContainerBaseName, LegacySobsPath); - std::error_code Error; + std::error_code Error; DiskSpace Space = DiskSpaceInfo(m_Config.RootDirectory, Error); if (Error) { @@ -900,9 +900,9 @@ CasContainerStrategy::OpenContainer(bool IsNewStore) if (Space.Free < m_MaxBlockSize) // Never let GC steal the last block space { ZEN_ERROR("legacy store migration from '{}' FAILED, required disk space {}, free {}", - m_Config.RootDirectory / m_ContainerBaseName, - m_MaxBlockSize, - NiceBytes(Space.Free)); + m_Config.RootDirectory / m_ContainerBaseName, + m_MaxBlockSize, + NiceBytes(Space.Free)); return; } @@ -952,11 +952,11 @@ CasContainerStrategy::OpenContainer(bool IsNewStore) m_CasLog.Open(SlogPath, true); - std::unique_ptr<ChunkBlock> NewBlockFile; + std::unique_ptr<ChunkBlock> NewBlockFile; uint64_t WriteOffset = {}; uint16_t NewBlockIndex = {}; - std::vector<uint8_t> Chunk; + std::vector<uint8_t> Chunk; for (const auto& ChunkHash : ChunkHashes) { const auto& Entry = LegacyDiskIndex[ChunkHash]; @@ -973,7 +973,7 @@ CasContainerStrategy::OpenContainer(bool IsNewStore) uint64_t ChunkEnd = ChunkLocation.GetOffset() + Chunk.size(); SmallObjectFile.SetFileSize(ChunkEnd); NewBlockIndex = NewBlockIndex + 1; - NewBlockFile = std::make_unique<ChunkBlock>(m_Config.RootDirectory, m_ContainerBaseName, NewBlockIndex); + NewBlockFile = std::make_unique<ChunkBlock>(m_Config.RootDirectory, m_ContainerBaseName, NewBlockIndex); NewBlockFile->Create(m_MaxBlockSize); WriteOffset = 0; } |