diff options
Diffstat (limited to 'src/os/FileStore.h')
-rw-r--r-- | src/os/FileStore.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/os/FileStore.h b/src/os/FileStore.h index 86d267dddf1..3db7ea48eb4 100644 --- a/src/os/FileStore.h +++ b/src/os/FileStore.h @@ -51,6 +51,26 @@ using namespace __gnu_cxx; # define FALLOC_FL_PUNCH_HOLE 0x2 #endif +#define CEPH_FS_FEATURE_INCOMPAT_SHARDS CompatSet::Feature(1, "sharded objects") + +class FSSuperblock { +public: + CompatSet compat_features; + + FSSuperblock() { } + + void encode(bufferlist &bl) const; + void decode(bufferlist::iterator &bl); + void dump(Formatter *f) const; + static void generate_test_instances(list<FSSuperblock*>& o); +}; +WRITE_CLASS_ENCODER(FSSuperblock) + +inline ostream& operator<<(ostream& out, const FSSuperblock& sb) +{ + return out << "sb(" << sb.compat_features << ")"; +} + class FileStore : public JournalingObjectStore, public md_config_obs_t { @@ -294,6 +314,8 @@ public: int get_max_object_name_length(); int mkfs(); int mkjournal(); + void set_allow_sharded_objects(); + bool get_allow_sharded_objects(); int statfs(struct statfs *buf); @@ -528,6 +550,10 @@ private: std::ofstream m_filestore_dump; JSONFormatter m_filestore_dump_fmt; atomic_t m_filestore_kill_at; + FSSuperblock superblock; + + int write_superblock(); + int read_superblock(); }; ostream& operator<<(ostream& out, const FileStore::OpSequencer& s); |