Loading include/daemon/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ target_sources( classes/rpc_data.hpp handler/rpc_defs.hpp handler/rpc_util.hpp malleability/malleable_manager.hpp ) if(GKFS_ENABLE_AGIOS) Loading include/daemon/classes/fs_data.hpp +12 −2 Original line number Diff line number Diff line Loading @@ -51,6 +51,10 @@ namespace utils { class Stats; } namespace malleable { class MalleableManager; } namespace daemon { class FsData { Loading Loading @@ -106,15 +110,14 @@ private: // Prometheus std::string prometheus_gateway_ = gkfs::config::stats::prometheus_gateway; // Malleability // maintenance mode is used to prevent new RPCs to the filesystem and // indicates for clients: try again. Is set to true when redist is running bool maintenance_mode_ = false; ABT_mutex maintenance_mode_mutex_; // redist_running_ indicates to client that redistribution is running bool redist_running_ = false; ABT_thread redist_thread_; std::shared_ptr<gkfs::malleable::MalleableManager> malleable_manager_; public: static FsData* Loading Loading @@ -308,6 +311,13 @@ public: void redist_running(bool redist_running); const std::shared_ptr<gkfs::malleable::MalleableManager>& malleable_manager() const; void malleable_manager(const std::shared_ptr<gkfs::malleable::MalleableManager>& malleable_manager); }; Loading include/daemon/malleability/malleable_manager.hpp 0 → 100644 +55 −0 Original line number Diff line number Diff line /* Copyright 2018-2024, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2024, Johannes Gutenberg Universitaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the SPPEXA project funded by the DFG. This file is part of GekkoFS. GekkoFS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GekkoFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GekkoFS. If not, see <https://www.gnu.org/licenses/>. SPDX-License-Identifier: GPL-3.0-or-later */ #ifndef GEKKOFS_DAEMON_MALLEABLE_MANAGER_HPP #define GEKKOFS_DAEMON_MALLEABLE_MANAGER_HPP #include <daemon/daemon.hpp> namespace gkfs::malleable { class MalleableManager { private: ABT_thread redist_thread_; static void expand_abt(void* _arg); void redistribute_metadata(); void redistribute_data(); public: void expand_start(int old_server_conf, int new_server_conf); }; } // namespace gkfs::malleable #endif // GEKKOFS_MALLEABLE_MANAGER_HPP src/daemon/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ target_sources( handler/srv_metadata.cpp handler/srv_management.cpp handler/srv_malleability.cpp malleability/malleable_manager.cpp PUBLIC ${CMAKE_SOURCE_DIR}/include/config.hpp ${CMAKE_SOURCE_DIR}/include/version.hpp.in ) Loading src/daemon/classes/fs_data.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -350,4 +350,16 @@ FsData::redist_running(bool redist_running) { redist_running_ = redist_running; } const std::shared_ptr<gkfs::malleable::MalleableManager>& FsData::malleable_manager() const { return malleable_manager_; } void FsData::malleable_manager( const std::shared_ptr<gkfs::malleable::MalleableManager>& malleable_manager) { malleable_manager_ = malleable_manager; } } // namespace gkfs::daemon Loading
include/daemon/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ target_sources( classes/rpc_data.hpp handler/rpc_defs.hpp handler/rpc_util.hpp malleability/malleable_manager.hpp ) if(GKFS_ENABLE_AGIOS) Loading
include/daemon/classes/fs_data.hpp +12 −2 Original line number Diff line number Diff line Loading @@ -51,6 +51,10 @@ namespace utils { class Stats; } namespace malleable { class MalleableManager; } namespace daemon { class FsData { Loading Loading @@ -106,15 +110,14 @@ private: // Prometheus std::string prometheus_gateway_ = gkfs::config::stats::prometheus_gateway; // Malleability // maintenance mode is used to prevent new RPCs to the filesystem and // indicates for clients: try again. Is set to true when redist is running bool maintenance_mode_ = false; ABT_mutex maintenance_mode_mutex_; // redist_running_ indicates to client that redistribution is running bool redist_running_ = false; ABT_thread redist_thread_; std::shared_ptr<gkfs::malleable::MalleableManager> malleable_manager_; public: static FsData* Loading Loading @@ -308,6 +311,13 @@ public: void redist_running(bool redist_running); const std::shared_ptr<gkfs::malleable::MalleableManager>& malleable_manager() const; void malleable_manager(const std::shared_ptr<gkfs::malleable::MalleableManager>& malleable_manager); }; Loading
include/daemon/malleability/malleable_manager.hpp 0 → 100644 +55 −0 Original line number Diff line number Diff line /* Copyright 2018-2024, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2024, Johannes Gutenberg Universitaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the SPPEXA project funded by the DFG. This file is part of GekkoFS. GekkoFS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GekkoFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GekkoFS. If not, see <https://www.gnu.org/licenses/>. SPDX-License-Identifier: GPL-3.0-or-later */ #ifndef GEKKOFS_DAEMON_MALLEABLE_MANAGER_HPP #define GEKKOFS_DAEMON_MALLEABLE_MANAGER_HPP #include <daemon/daemon.hpp> namespace gkfs::malleable { class MalleableManager { private: ABT_thread redist_thread_; static void expand_abt(void* _arg); void redistribute_metadata(); void redistribute_data(); public: void expand_start(int old_server_conf, int new_server_conf); }; } // namespace gkfs::malleable #endif // GEKKOFS_MALLEABLE_MANAGER_HPP
src/daemon/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ target_sources( handler/srv_metadata.cpp handler/srv_management.cpp handler/srv_malleability.cpp malleability/malleable_manager.cpp PUBLIC ${CMAKE_SOURCE_DIR}/include/config.hpp ${CMAKE_SOURCE_DIR}/include/version.hpp.in ) Loading
src/daemon/classes/fs_data.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -350,4 +350,16 @@ FsData::redist_running(bool redist_running) { redist_running_ = redist_running; } const std::shared_ptr<gkfs::malleable::MalleableManager>& FsData::malleable_manager() const { return malleable_manager_; } void FsData::malleable_manager( const std::shared_ptr<gkfs::malleable::MalleableManager>& malleable_manager) { malleable_manager_ = malleable_manager; } } // namespace gkfs::daemon