Loading include/client/gkfs_functions.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ namespace gkfs { namespace func { std::shared_ptr<Metadata> metadata(const std::string& path, bool follow_links = false); std::shared_ptr<gkfs::metadata::Metadata> metadata(const std::string& path, bool follow_links = false); int check_parent_dir(const std::string& path); Loading include/client/preload_util.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ namespace util { return static_cast<typename std::underlying_type<E>::type>(e); } int metadata_to_stat(const std::string& path, const Metadata& md, struct stat& attr); int metadata_to_stat(const std::string& path, const gkfs::metadata::Metadata& md, struct stat& attr); std::vector<std::pair<std::string, std::string>> load_hostfile(const std::string& lfpath); Loading include/daemon/backend/metadata/db.hpp +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ namespace rdb = rocksdb; namespace gkfs { namespace metadata { class MetadataDB { private: std::unique_ptr<rdb::DB> db; Loading Loading @@ -53,4 +56,7 @@ public: void iterate_all(); }; } // namespace metadata } // namespace gkfs #endif //GEKKOFS_METADATA_DB_HPP include/daemon/backend/metadata/merge.hpp +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ namespace rdb = rocksdb; namespace gkfs { namespace metadata { enum class OperandID : char { increase_size = 'i', decrease_size = 'd', Loading Loading @@ -102,4 +105,7 @@ public: bool AllowSingleOperand() const override; }; } // namespace metadata } // namespace gkfs #endif // DB_MERGE_HPP include/daemon/classes/fs_data.hpp +7 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,11 @@ #include <daemon/daemon.hpp> /* Forward declarations */ namespace gkfs { namespace metadata { class MetadataDB; } } class ChunkStorage; Loading @@ -43,7 +47,7 @@ private: std::string hosts_file_; // Database std::shared_ptr<MetadataDB> mdb_; std::shared_ptr<gkfs::metadata::MetadataDB> mdb_; // Storage backend std::shared_ptr<ChunkStorage> storage_; Loading Loading @@ -82,9 +86,9 @@ public: void metadir(const std::string& metadir_); const std::shared_ptr<MetadataDB>& mdb() const; const std::shared_ptr<gkfs::metadata::MetadataDB>& mdb() const; void mdb(const std::shared_ptr<MetadataDB>& mdb); void mdb(const std::shared_ptr<gkfs::metadata::MetadataDB>& mdb); void close_mdb(); Loading Loading
include/client/gkfs_functions.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ namespace gkfs { namespace func { std::shared_ptr<Metadata> metadata(const std::string& path, bool follow_links = false); std::shared_ptr<gkfs::metadata::Metadata> metadata(const std::string& path, bool follow_links = false); int check_parent_dir(const std::string& path); Loading
include/client/preload_util.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ namespace util { return static_cast<typename std::underlying_type<E>::type>(e); } int metadata_to_stat(const std::string& path, const Metadata& md, struct stat& attr); int metadata_to_stat(const std::string& path, const gkfs::metadata::Metadata& md, struct stat& attr); std::vector<std::pair<std::string, std::string>> load_hostfile(const std::string& lfpath); Loading
include/daemon/backend/metadata/db.hpp +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ namespace rdb = rocksdb; namespace gkfs { namespace metadata { class MetadataDB { private: std::unique_ptr<rdb::DB> db; Loading Loading @@ -53,4 +56,7 @@ public: void iterate_all(); }; } // namespace metadata } // namespace gkfs #endif //GEKKOFS_METADATA_DB_HPP
include/daemon/backend/metadata/merge.hpp +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ namespace rdb = rocksdb; namespace gkfs { namespace metadata { enum class OperandID : char { increase_size = 'i', decrease_size = 'd', Loading Loading @@ -102,4 +105,7 @@ public: bool AllowSingleOperand() const override; }; } // namespace metadata } // namespace gkfs #endif // DB_MERGE_HPP
include/daemon/classes/fs_data.hpp +7 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,11 @@ #include <daemon/daemon.hpp> /* Forward declarations */ namespace gkfs { namespace metadata { class MetadataDB; } } class ChunkStorage; Loading @@ -43,7 +47,7 @@ private: std::string hosts_file_; // Database std::shared_ptr<MetadataDB> mdb_; std::shared_ptr<gkfs::metadata::MetadataDB> mdb_; // Storage backend std::shared_ptr<ChunkStorage> storage_; Loading Loading @@ -82,9 +86,9 @@ public: void metadir(const std::string& metadir_); const std::shared_ptr<MetadataDB>& mdb() const; const std::shared_ptr<gkfs::metadata::MetadataDB>& mdb() const; void mdb(const std::shared_ptr<MetadataDB>& mdb); void mdb(const std::shared_ptr<gkfs::metadata::MetadataDB>& mdb); void close_mdb(); Loading