aboutsummaryrefslogtreecommitdiff
path: root/zenstore
diff options
context:
space:
mode:
Diffstat (limited to 'zenstore')
-rw-r--r--zenstore/blockstore.cpp2
-rw-r--r--zenstore/include/zenstore/blockstore.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/zenstore/blockstore.cpp b/zenstore/blockstore.cpp
index d743c431f..0e1c5b2c7 100644
--- a/zenstore/blockstore.cpp
+++ b/zenstore/blockstore.cpp
@@ -280,7 +280,7 @@ BlockStore::GetReclaimSnapshotState()
}
IoBuffer
-BlockStore::TryGetChunk(const BlockStoreLocation& Location)
+BlockStore::TryGetChunk(const BlockStoreLocation& Location) const
{
RwLock::SharedLockScope InsertLock(m_InsertLock);
if (auto BlockIt = m_ChunkBlocks.find(Location.BlockIndex); BlockIt != m_ChunkBlocks.end())
diff --git a/zenstore/include/zenstore/blockstore.h b/zenstore/include/zenstore/blockstore.h
index 5ef2d4694..857ccae38 100644
--- a/zenstore/include/zenstore/blockstore.h
+++ b/zenstore/include/zenstore/blockstore.h
@@ -132,7 +132,7 @@ public:
void WriteChunk(const void* Data, uint64_t Size, uint64_t Alignment, const WriteChunkCallback& Callback);
- IoBuffer TryGetChunk(const BlockStoreLocation& Location);
+ IoBuffer TryGetChunk(const BlockStoreLocation& Location) const;
void Flush();
ReclaimSnapshotState GetReclaimSnapshotState();
@@ -157,7 +157,7 @@ public:
private:
std::unordered_map<uint32_t, Ref<BlockStoreFile>> m_ChunkBlocks;
- RwLock m_InsertLock; // used to serialize inserts
+ mutable RwLock m_InsertLock; // used to serialize inserts
Ref<BlockStoreFile> m_WriteBlock;
std::uint64_t m_CurrentInsertOffset = 0;
std::atomic_uint32_t m_WriteBlockIndex{};