aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zenstore/filecas.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/zenstore/filecas.h b/zenstore/filecas.h
index 686fd2ea8..ec2ca3f31 100644
--- a/zenstore/filecas.h
+++ b/zenstore/filecas.h
@@ -22,15 +22,6 @@ namespace zen {
class BasicFile;
-struct FileCasIndexEntry
-{
- IoHash Key;
- uint32_t Pad = 0;
- uint64_t Size = 0;
-};
-
-static_assert(sizeof(FileCasIndexEntry) == 32);
-
/** CAS storage strategy using a file-per-chunk storage strategy
*/
@@ -50,13 +41,23 @@ struct FileCasStrategy : public GcStorage
void Scrub(ScrubContext& Ctx);
private:
- const CasStoreConfiguration& m_Config;
- RwLock m_Lock;
- RwLock m_ShardLocks[256]; // TODO: these should be spaced out so they don't share cache lines
- spdlog::logger& m_Log;
- spdlog::logger& Log() { return m_Log; }
+ const CasStoreConfiguration& m_Config;
+ RwLock m_Lock;
+ RwLock m_ShardLocks[256]; // TODO: these should be spaced out so they don't share cache lines
+ spdlog::logger& m_Log;
+ spdlog::logger& Log() { return m_Log; }
+ bool m_IsInitialized = false;
+
+ struct FileCasIndexEntry
+ {
+ IoHash Key;
+ uint32_t Pad = 0;
+ uint64_t Size = 0;
+ };
+
+ static_assert(sizeof(FileCasIndexEntry) == 32);
+
TCasLogFile<FileCasIndexEntry> m_CasLog;
- bool m_IsInitialized = false;
inline RwLock& LockForHash(const IoHash& Hash) { return m_ShardLocks[Hash.Hash[19]]; }
void IterateChunks(std::function<void(const IoHash& Hash, BasicFile& PayloadFile)>&& Callback);