Loading include/global/rpc/rpc_utils.hpp→include/daemon/handler/rpc_util.hpp +11 −11 Original line number Diff line number Diff line Loading @@ -11,9 +11,8 @@ SPDX-License-Identifier: MIT */ #ifndef GEKKOFS_RPC_UTILS_HPP #define GEKKOFS_RPC_UTILS_HPP #ifndef GEKKOFS_DAEMON_RPC_UTIL_HPP #define GEKKOFS_DAEMON_RPC_UTIL_HPP extern "C" { #include <mercury_types.h> Loading @@ -23,8 +22,11 @@ extern "C" { #include <string> namespace gkfs { namespace rpc { template<typename I, typename O> inline hg_return_t rpc_cleanup(hg_handle_t* handle, I* input, O* output, hg_bulk_t* bulk_handle) { inline hg_return_t cleanup(hg_handle_t* handle, I* input, O* output, hg_bulk_t* bulk_handle) { auto ret = HG_SUCCESS; if (bulk_handle) { ret = margo_bulk_free(*bulk_handle); Loading @@ -50,21 +52,19 @@ inline hg_return_t rpc_cleanup(hg_handle_t* handle, I* input, O* output, hg_bulk } template<typename I, typename O> inline hg_return_t rpc_cleanup_respond(hg_handle_t* handle, I* input, O* output, hg_bulk_t* bulk_handle) { inline hg_return_t cleanup_respond(hg_handle_t* handle, I* input, O* output, hg_bulk_t* bulk_handle) { auto ret = HG_SUCCESS; if (output && handle) { ret = margo_respond(*handle, output); if (ret != HG_SUCCESS) return ret; } return rpc_cleanup(handle, input, static_cast<O*>(nullptr), bulk_handle); return cleanup(handle, input, static_cast<O*>(nullptr), bulk_handle); } hg_bool_t bool_to_merc_bool(bool state); std::string get_my_hostname(bool short_hostname = false); } // namespace rpc } // namespace gkfs std::string get_host_by_name(const std::string& hostname); #endif //GEKKOFS_RPC_UTILS_HPP #endif //GEKKOFS_DAEMON_RPC_UTIL_HPP include/global/rpc/rpc_util.hpp 0 → 100644 +31 −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_GLOBAL_RPC_UTILS_HPP #define GEKKOFS_GLOBAL_RPC_UTILS_HPP extern "C" { #include <mercury_types.h> #include <mercury_proc_string.h> } #include <string> hg_bool_t bool_to_merc_bool(bool state); std::string get_my_hostname(bool short_hostname = false); std::string get_host_by_name(const std::string& hostname); #endif //GEKKOFS_GLOBAL_RPC_UTILS_HPP src/client/CMakeLists.txt +2 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ set(PRELOAD_SRC preload_context.cpp preload_util.cpp ../global/path_util.cpp ../global/rpc/rpc_utils.cpp ../global/rpc/rpc_util.cpp rpc/rpc_types.cpp rpc/forward_data.cpp rpc/forward_management.cpp Loading Loading @@ -46,7 +46,7 @@ set(PRELOAD_HEADERS ../../include/global/global_defs.hpp ../../include/global/path_util.hpp ../../include/global/rpc/rpc_types.hpp ../../include/global/rpc/rpc_utils.hpp ../../include/global/rpc/rpc_util.hpp ) add_library(gkfs_intercept SHARED ${PRELOAD_SRC} ${PRELOAD_HEADERS}) Loading src/client/preload_util.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ #include <client/logging.hpp> #include <global/rpc/distributor.hpp> #include <global/rpc/rpc_utils.hpp> #include <global/rpc/rpc_util.hpp> #include <global/env_util.hpp> #include <hermes.hpp> Loading src/client/rpc/forward_metadata.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ #include <client/open_dir.hpp> #include <client/rpc/rpc_types.hpp> #include <global/rpc/rpc_utils.hpp> #include <global/rpc/rpc_util.hpp> #include <global/rpc/distributor.hpp> #include <global/rpc/rpc_types.hpp> Loading Loading
include/global/rpc/rpc_utils.hpp→include/daemon/handler/rpc_util.hpp +11 −11 Original line number Diff line number Diff line Loading @@ -11,9 +11,8 @@ SPDX-License-Identifier: MIT */ #ifndef GEKKOFS_RPC_UTILS_HPP #define GEKKOFS_RPC_UTILS_HPP #ifndef GEKKOFS_DAEMON_RPC_UTIL_HPP #define GEKKOFS_DAEMON_RPC_UTIL_HPP extern "C" { #include <mercury_types.h> Loading @@ -23,8 +22,11 @@ extern "C" { #include <string> namespace gkfs { namespace rpc { template<typename I, typename O> inline hg_return_t rpc_cleanup(hg_handle_t* handle, I* input, O* output, hg_bulk_t* bulk_handle) { inline hg_return_t cleanup(hg_handle_t* handle, I* input, O* output, hg_bulk_t* bulk_handle) { auto ret = HG_SUCCESS; if (bulk_handle) { ret = margo_bulk_free(*bulk_handle); Loading @@ -50,21 +52,19 @@ inline hg_return_t rpc_cleanup(hg_handle_t* handle, I* input, O* output, hg_bulk } template<typename I, typename O> inline hg_return_t rpc_cleanup_respond(hg_handle_t* handle, I* input, O* output, hg_bulk_t* bulk_handle) { inline hg_return_t cleanup_respond(hg_handle_t* handle, I* input, O* output, hg_bulk_t* bulk_handle) { auto ret = HG_SUCCESS; if (output && handle) { ret = margo_respond(*handle, output); if (ret != HG_SUCCESS) return ret; } return rpc_cleanup(handle, input, static_cast<O*>(nullptr), bulk_handle); return cleanup(handle, input, static_cast<O*>(nullptr), bulk_handle); } hg_bool_t bool_to_merc_bool(bool state); std::string get_my_hostname(bool short_hostname = false); } // namespace rpc } // namespace gkfs std::string get_host_by_name(const std::string& hostname); #endif //GEKKOFS_RPC_UTILS_HPP #endif //GEKKOFS_DAEMON_RPC_UTIL_HPP
include/global/rpc/rpc_util.hpp 0 → 100644 +31 −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_GLOBAL_RPC_UTILS_HPP #define GEKKOFS_GLOBAL_RPC_UTILS_HPP extern "C" { #include <mercury_types.h> #include <mercury_proc_string.h> } #include <string> hg_bool_t bool_to_merc_bool(bool state); std::string get_my_hostname(bool short_hostname = false); std::string get_host_by_name(const std::string& hostname); #endif //GEKKOFS_GLOBAL_RPC_UTILS_HPP
src/client/CMakeLists.txt +2 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ set(PRELOAD_SRC preload_context.cpp preload_util.cpp ../global/path_util.cpp ../global/rpc/rpc_utils.cpp ../global/rpc/rpc_util.cpp rpc/rpc_types.cpp rpc/forward_data.cpp rpc/forward_management.cpp Loading Loading @@ -46,7 +46,7 @@ set(PRELOAD_HEADERS ../../include/global/global_defs.hpp ../../include/global/path_util.hpp ../../include/global/rpc/rpc_types.hpp ../../include/global/rpc/rpc_utils.hpp ../../include/global/rpc/rpc_util.hpp ) add_library(gkfs_intercept SHARED ${PRELOAD_SRC} ${PRELOAD_HEADERS}) Loading
src/client/preload_util.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ #include <client/logging.hpp> #include <global/rpc/distributor.hpp> #include <global/rpc/rpc_utils.hpp> #include <global/rpc/rpc_util.hpp> #include <global/env_util.hpp> #include <hermes.hpp> Loading
src/client/rpc/forward_metadata.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ #include <client/open_dir.hpp> #include <client/rpc/rpc_types.hpp> #include <global/rpc/rpc_utils.hpp> #include <global/rpc/rpc_util.hpp> #include <global/rpc/distributor.hpp> #include <global/rpc/rpc_types.hpp> Loading