aboutsummaryrefslogtreecommitdiff
path: root/zenstore/compactcas.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-05-02 17:06:30 +0200
committerDan Engelbrecht <[email protected]>2022-05-02 17:06:30 +0200
commit1e3da36ef01f6b823febf22645a314267353a223 (patch)
tree60f2a2b5f680cc04e6546bf4aaf7e0d94ad1632a /zenstore/compactcas.cpp
parentclean up any incomplete blocks if ReclaimSpace fails (diff)
downloadzen-1e3da36ef01f6b823febf22645a314267353a223.tar.xz
zen-1e3da36ef01f6b823febf22645a314267353a223.zip
switched back memory_order for m_TotalSize to relaxed
Diffstat (limited to 'zenstore/compactcas.cpp')
-rw-r--r--zenstore/compactcas.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/zenstore/compactcas.cpp b/zenstore/compactcas.cpp
index e0f84e044..22f8ea0c3 100644
--- a/zenstore/compactcas.cpp
+++ b/zenstore/compactcas.cpp
@@ -258,7 +258,7 @@ CasContainerStrategy::InsertChunk(const void* ChunkData, size_t ChunkSize, const
RwLock::ExclusiveLockScope _(m_LocationMapLock);
m_LocationMap.emplace(ChunkHash, DiskLocation);
}
- m_TotalSize.fetch_add(static_cast<uint64_t>(ChunkSize), std::memory_order_seq_cst);
+ m_TotalSize.fetch_add(static_cast<uint64_t>(ChunkSize), std::memory_order::relaxed);
return CasStore::InsertResult{.New = true};
}
@@ -960,7 +960,7 @@ CasContainerStrategy::OpenContainer(bool IsNewStore)
for (const auto& Entry : m_LocationMap)
{
const BlockStoreDiskLocation& Location = Entry.second;
- m_TotalSize.fetch_add(Location.GetSize(), std::memory_order_seq_cst);
+ m_TotalSize.fetch_add(Location.GetSize(), std::memory_order::relaxed);
KnownLocations.push_back(Location.Get(m_PayloadAlignment));
}