aboutsummaryrefslogtreecommitdiff
path: root/zenstore
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-20 12:08:44 +0200
committerStefan Boberg <[email protected]>2021-09-20 12:08:44 +0200
commit782351959f697fca6b0804c134467b7d9c29da1a (patch)
treefdd6c841a567e69e3d0b45089de70c7e7d0bb756 /zenstore
parenttrivial: include cleanup (diff)
downloadzen-782351959f697fca6b0804c134467b7d9c29da1a.tar.xz
zen-782351959f697fca6b0804c134467b7d9c29da1a.zip
Moved more code into zen namespace, for consistency
Also removed snapshot_manifest (remnants of vfs prototype)
Diffstat (limited to 'zenstore')
-rw-r--r--zenstore/CAS.cpp4
-rw-r--r--zenstore/caslog.cpp6
-rw-r--r--zenstore/cidstore.cpp2
-rw-r--r--zenstore/compactcas.cpp6
-rw-r--r--zenstore/filecas.cpp2
-rw-r--r--zenstore/include/zenstore/caslog.h2
6 files changed, 11 insertions, 11 deletions
diff --git a/zenstore/CAS.cpp b/zenstore/CAS.cpp
index 320ca9e5a..916e7f709 100644
--- a/zenstore/CAS.cpp
+++ b/zenstore/CAS.cpp
@@ -200,10 +200,10 @@ TEST_CASE("CasStore")
{
ScopedTemporaryDirectory TempDir;
- zen::CasStoreConfiguration config;
+ CasStoreConfiguration config;
config.RootDirectory = TempDir.Path();
- std::unique_ptr<zen::CasStore> Store{CreateCasStore()};
+ std::unique_ptr<CasStore> Store{CreateCasStore()};
Store->Initialize(config);
ScrubContext Ctx;
diff --git a/zenstore/caslog.cpp b/zenstore/caslog.cpp
index 70bcf4669..dc6021544 100644
--- a/zenstore/caslog.cpp
+++ b/zenstore/caslog.cpp
@@ -62,7 +62,7 @@ CasLogFile::Open(std::filesystem::path FileName, size_t RecordSize, bool IsCreat
if (IsCreate)
{
// Initialize log by writing header
- FileHeader Header = {.RecordSize = gsl::narrow<uint32_t>(RecordSize), .LogId = zen::Oid::NewOid(), .ValidatedTail = 0};
+ FileHeader Header = {.RecordSize = gsl::narrow<uint32_t>(RecordSize), .LogId = Oid::NewOid(), .ValidatedTail = 0};
memcpy(Header.Magic, FileHeader::MagicSequence, sizeof Header.Magic);
Header.Finalize();
@@ -128,7 +128,7 @@ CasLogFile::Replay(std::function<void(const void*)>&& Handler)
if (FAILED(hRes))
{
- zen::ThrowSystemException(hRes, "Failed to read log file");
+ ThrowSystemException(hRes, "Failed to read log file");
}
for (int i = 0; i < LogEntryCount; ++i)
@@ -144,7 +144,7 @@ CasLogFile::Append(const void* DataPointer, uint64_t DataSize)
if (FAILED(hRes))
{
- zen::ThrowSystemException(hRes, "Failed to write to log file '{}'"_format(zen::PathFromHandle(m_File)));
+ ThrowSystemException(hRes, "Failed to write to log file '{}'"_format(PathFromHandle(m_File)));
}
}
diff --git a/zenstore/cidstore.cpp b/zenstore/cidstore.cpp
index 100054a0e..e1b7ac656 100644
--- a/zenstore/cidstore.cpp
+++ b/zenstore/cidstore.cpp
@@ -78,7 +78,7 @@ struct CidStore::CidState
void InitializeIndex(const std::filesystem::path& RootDir)
{
- zen::CreateDirectories(RootDir);
+ CreateDirectories(RootDir);
std::filesystem::path SlogPath{RootDir / "cid.slog"};
bool IsNew = !std::filesystem::exists(SlogPath);
diff --git a/zenstore/compactcas.cpp b/zenstore/compactcas.cpp
index 070ca1503..fe38f0fde 100644
--- a/zenstore/compactcas.cpp
+++ b/zenstore/compactcas.cpp
@@ -50,7 +50,7 @@ CasContainerStrategy::Initialize(const std::string_view ContainerBaseName, uint6
// This is not technically necessary (nobody should be accessing us from
// another thread at this stage) but may help static analysis
- zen::RwLock::ExclusiveLockScope _(m_LocationMapLock);
+ RwLock::ExclusiveLockScope _(m_LocationMapLock);
m_CasLog.Replay([&](const CasDiskIndexEntry& Record) {
m_LocationMap[Record.Key] = Record.Location;
@@ -113,7 +113,7 @@ CasContainerStrategy::FindChunk(const IoHash& ChunkHash)
if (auto KeyIt = m_LocationMap.find(ChunkHash); KeyIt != m_LocationMap.end())
{
const CasDiskLocation& Location = KeyIt->second;
- return zen::IoBufferBuilder::MakeFromFileHandle(m_SmallObjectFile.Handle(), Location.Offset, Location.Size);
+ return IoBufferBuilder::MakeFromFileHandle(m_SmallObjectFile.Handle(), Location.Offset, Location.Size);
}
// Not found
@@ -192,7 +192,7 @@ CasContainerStrategy::Scrub(ScrubContext& Ctx)
do
{
- const uint64_t ChunkSize = zen::Min(WindowSize, FileSize - WindowStart);
+ const uint64_t ChunkSize = Min(WindowSize, FileSize - WindowStart);
m_SmallObjectFile.Read(BufferBase, ChunkSize, WindowStart);
for (auto& Entry : m_LocationMap)
diff --git a/zenstore/filecas.cpp b/zenstore/filecas.cpp
index 31991a43e..983ce166e 100644
--- a/zenstore/filecas.cpp
+++ b/zenstore/filecas.cpp
@@ -159,7 +159,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash)
if (FAILED(hRes))
{
- zen::CreateDirectories(FilePath.c_str());
+ CreateDirectories(FilePath.c_str());
hRes = InternalCreateDirectoryHandle();
}
diff --git a/zenstore/include/zenstore/caslog.h b/zenstore/include/zenstore/caslog.h
index 3d558bee0..1fbda0265 100644
--- a/zenstore/include/zenstore/caslog.h
+++ b/zenstore/include/zenstore/caslog.h
@@ -33,7 +33,7 @@ private:
{
uint8_t Magic[16];
uint32_t RecordSize = 0;
- zen::Oid LogId;
+ Oid LogId;
uint32_t ValidatedTail = 0;
uint32_t Pad[6];
uint32_t Checksum = 0;