aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-03-23 15:37:35 +0100
committerDan Engelbrecht <[email protected]>2022-03-31 11:29:27 +0200
commit70b363d51bdb7222ba8c763bfa72cb55323de77d (patch)
tree065a4ff869fc8397bb295679785e78ace7aec4d8
parentSimpler creation of LocationMap copy (diff)
downloadzen-70b363d51bdb7222ba8c763bfa72cb55323de77d.tar.xz
zen-70b363d51bdb7222ba8c763bfa72cb55323de77d.zip
typedef for LocationMap
-rw-r--r--zenstore/compactcas.cpp6
-rw-r--r--zenstore/compactcas.h7
2 files changed, 7 insertions, 6 deletions
diff --git a/zenstore/compactcas.cpp b/zenstore/compactcas.cpp
index 312bc205d..4de5635a8 100644
--- a/zenstore/compactcas.cpp
+++ b/zenstore/compactcas.cpp
@@ -444,9 +444,9 @@ CasContainerStrategy::CollectGarbage(GcContext& GcCtx)
NiceBytes(OldTotalSize));
});
- std::unordered_map<IoHash, BlockStoreDiskLocation, IoHash::Hasher> LocationMap;
- size_t BlockCount;
- uint64_t ExcludeBlockIndex = 0x800000000ull;
+ LocationMap_t LocationMap;
+ size_t BlockCount;
+ uint64_t ExcludeBlockIndex = 0x800000000ull;
{
RwLock::SharedLockScope _i(m_InsertLock);
RwLock::SharedLockScope _l(m_LocationMapLock);
diff --git a/zenstore/compactcas.h b/zenstore/compactcas.h
index 833febc30..7a200eeed 100644
--- a/zenstore/compactcas.h
+++ b/zenstore/compactcas.h
@@ -75,9 +75,10 @@ private:
std::string m_ContainerBaseName;
std::filesystem::path m_BlocksBasePath;
- RwLock m_LocationMapLock;
- std::unordered_map<IoHash, BlockStoreDiskLocation, IoHash::Hasher> m_LocationMap;
- std::unordered_map<uint32_t, std::shared_ptr<BlockStoreFile>> m_ChunkBlocks;
+ RwLock m_LocationMapLock;
+ typedef std::unordered_map<IoHash, BlockStoreDiskLocation, IoHash::Hasher> LocationMap_t;
+ LocationMap_t m_LocationMap;
+ std::unordered_map<uint32_t, std::shared_ptr<BlockStoreFile>> m_ChunkBlocks;
RwLock m_InsertLock; // used to serialize inserts
std::weak_ptr<BlockStoreFile> m_WriteBlock;