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