Loading CMakeLists.txt +4 −0 Original line number Diff line number Diff line Loading @@ -239,8 +239,12 @@ include(GNUInstallDirs) add_subdirectory(src/global) # Daemon add_subdirectory(src/daemon) # Proxy add_subdirectory(src/proxy) # Client library add_subdirectory(src/client) add_subdirectory(marc) option(GKFS_BUILD_TESTS "Build GekkoFS self tests" OFF) Loading include/client/env.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ static constexpr auto HOSTS_FILE = ADD_PREFIX("HOSTS_FILE"); #ifdef GKFS_ENABLE_FORWARDING static constexpr auto FORWARDING_MAP_FILE = ADD_PREFIX("FORWARDING_MAP_FILE"); #endif static constexpr auto PROXY_PID_FILE = ADD_PREFIX("PROXY_PID_FILE"); } // namespace gkfs::env Loading include/client/preload_context.hpp +26 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,11 @@ private: std::string rpc_protocol_; bool auto_sm_{false}; // proxy stuff bool use_proxy_{false}; std::string proxy_address_str_; hermes::endpoint proxy_host_; bool interception_enabled_; std::bitset<MAX_INTERNAL_FDS> internal_fds_; Loading Loading @@ -166,6 +171,27 @@ public: void auto_sm(bool auto_sm); bool use_proxy() const; void use_proxy(bool use_proxy); const std::string& proxy_address_str() const; void proxy_address_str(const std::string& proxy_address_str); const hermes::endpoint& proxy_host() const; void proxy_host(const hermes::endpoint& proxy_host); void clear_proxy_host(); RelativizeStatus relativize_fd_path(int dirfd, const char* raw_path, std::string& relative_path, Loading include/client/preload_util.hpp +8 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ class async_engine; } extern std::unique_ptr<hermes::async_engine> ld_network_service; extern std::unique_ptr<hermes::async_engine> ld_proxy_service; // function definitions namespace gkfs::utils { Loading Loading @@ -89,6 +90,13 @@ read_hosts_file(); void connect_to_hosts(const std::vector<std::pair<std::string, std::string>>& hosts); void check_for_proxy(); void lookup_proxy_addr(); } // namespace gkfs::utils #endif // GEKKOFS_PRELOAD_UTIL_HPP include/client/rpc/forward_data_proxy.hpp 0 → 100644 +32 −0 Original line number Diff line number Diff line /* Copyright 2018-2020, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2020, 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. SPDX-License-Identifier: MIT */ #ifndef GEKKOFS_FORWARD_DATA_PROXY_HPP #define GEKKOFS_FORWARD_DATA_PROXY_HPP namespace gkfs { namespace rpc { ssize_t forward_write_proxy(const std::string& path, const void* buf, bool append_flag, off64_t in_offset, size_t write_size, int64_t updated_metadentry_size); ssize_t forward_read_proxy(const std::string& path, void* buf, off64_t offset, size_t read_size); } // namespace rpc } // namespace gkfs #endif // GEKKOFS_FORWARD_DATA_PROXY_HPP Loading
CMakeLists.txt +4 −0 Original line number Diff line number Diff line Loading @@ -239,8 +239,12 @@ include(GNUInstallDirs) add_subdirectory(src/global) # Daemon add_subdirectory(src/daemon) # Proxy add_subdirectory(src/proxy) # Client library add_subdirectory(src/client) add_subdirectory(marc) option(GKFS_BUILD_TESTS "Build GekkoFS self tests" OFF) Loading
include/client/env.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ static constexpr auto HOSTS_FILE = ADD_PREFIX("HOSTS_FILE"); #ifdef GKFS_ENABLE_FORWARDING static constexpr auto FORWARDING_MAP_FILE = ADD_PREFIX("FORWARDING_MAP_FILE"); #endif static constexpr auto PROXY_PID_FILE = ADD_PREFIX("PROXY_PID_FILE"); } // namespace gkfs::env Loading
include/client/preload_context.hpp +26 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,11 @@ private: std::string rpc_protocol_; bool auto_sm_{false}; // proxy stuff bool use_proxy_{false}; std::string proxy_address_str_; hermes::endpoint proxy_host_; bool interception_enabled_; std::bitset<MAX_INTERNAL_FDS> internal_fds_; Loading Loading @@ -166,6 +171,27 @@ public: void auto_sm(bool auto_sm); bool use_proxy() const; void use_proxy(bool use_proxy); const std::string& proxy_address_str() const; void proxy_address_str(const std::string& proxy_address_str); const hermes::endpoint& proxy_host() const; void proxy_host(const hermes::endpoint& proxy_host); void clear_proxy_host(); RelativizeStatus relativize_fd_path(int dirfd, const char* raw_path, std::string& relative_path, Loading
include/client/preload_util.hpp +8 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ class async_engine; } extern std::unique_ptr<hermes::async_engine> ld_network_service; extern std::unique_ptr<hermes::async_engine> ld_proxy_service; // function definitions namespace gkfs::utils { Loading Loading @@ -89,6 +90,13 @@ read_hosts_file(); void connect_to_hosts(const std::vector<std::pair<std::string, std::string>>& hosts); void check_for_proxy(); void lookup_proxy_addr(); } // namespace gkfs::utils #endif // GEKKOFS_PRELOAD_UTIL_HPP
include/client/rpc/forward_data_proxy.hpp 0 → 100644 +32 −0 Original line number Diff line number Diff line /* Copyright 2018-2020, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2020, 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. SPDX-License-Identifier: MIT */ #ifndef GEKKOFS_FORWARD_DATA_PROXY_HPP #define GEKKOFS_FORWARD_DATA_PROXY_HPP namespace gkfs { namespace rpc { ssize_t forward_write_proxy(const std::string& path, const void* buf, bool append_flag, off64_t in_offset, size_t write_size, int64_t updated_metadentry_size); ssize_t forward_read_proxy(const std::string& path, void* buf, off64_t offset, size_t read_size); } // namespace rpc } // namespace gkfs #endif // GEKKOFS_FORWARD_DATA_PROXY_HPP