Loading ifs/include/preload/adafs_functions.hpp +0 −1 Original line number Diff line number Diff line #ifndef IFS_ADAFS_FUNCTIONS_HPP #define IFS_ADAFS_FUNCTIONS_HPP #include <preload/preload_util.hpp> #include <preload/open_file_map.hpp> /* Loading ifs/include/preload/passthrough.hpp +0 −3 Original line number Diff line number Diff line Loading @@ -5,9 +5,6 @@ #ifndef IFS_PASSTHROUGH_HPP #define IFS_PASSTHROUGH_HPP #include <preload/preload.hpp> #include <iostream> // function pointer for preloading extern void* libc; Loading ifs/include/preload/preload.hpp +0 −2 Original line number Diff line number Diff line Loading @@ -8,8 +8,6 @@ #define CTX PreloadContext::getInstance() bool ld_is_aux_loaded(); void init_ld_env_if_needed(); void init_preload() __attribute__((constructor)); Loading ifs/include/preload/preload_context.hpp +32 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,31 @@ class OpenFileMap; class Distributor; struct FsConfig { // configurable metadata bool atime_state; bool mtime_state; bool ctime_state; bool uid_state; bool gid_state; bool inode_no_state; bool link_cnt_state; bool blocks_state; uid_t uid; gid_t gid; std::string rootdir; // rpc infos std::map<uint64_t, std::string> hosts; std::map<std::string, std::string> sys_hostfile; uint64_t host_id; // my host number size_t host_size; std::string rpc_port; }; class PreloadContext { private: PreloadContext(); Loading @@ -17,7 +42,10 @@ class PreloadContext { std::shared_ptr<spdlog::logger> log_; std::shared_ptr<OpenFileMap> ofm_; std::shared_ptr<Distributor> distributor_; std::shared_ptr<FsConfig> fs_conf_; std::string mountdir_; bool initialized_; public: static PreloadContext* getInstance() { Loading @@ -40,6 +68,10 @@ class PreloadContext { void distributor(std::shared_ptr<Distributor> distributor); std::shared_ptr<Distributor> distributor() const; const std::shared_ptr<FsConfig>& fs_conf() const; void initialized(const bool& flag); bool initialized() const; }; Loading ifs/include/preload/preload_util.hpp +0 −27 Original line number Diff line number Diff line Loading @@ -11,31 +11,6 @@ extern "C" { #include <margo.h> } // TODO singleton this stuff away // The contents of FsConfig or only set once when set up struct FsConfig { // configurable metadata bool atime_state; bool mtime_state; bool ctime_state; bool uid_state; bool gid_state; bool inode_no_state; bool link_cnt_state; bool blocks_state; uid_t uid; gid_t gid; std::string rootdir; // rpc infos std::map<uint64_t, std::string> hosts; std::map<std::string, std::string> sys_hostfile; uint64_t host_id; // my host number size_t host_size; std::string rpc_port; }; // Used to bundle metadata into one place struct Metadentry { time_t atime; Loading Loading @@ -95,8 +70,6 @@ extern hg_id_t rpc_update_metadentry_size_id; extern hg_id_t rpc_write_data_id; extern hg_id_t rpc_read_data_id; extern hg_id_t rpc_get_dirents_id; // fs_config is set ONCE in the beginning. It shall not be modified afterwards extern std::shared_ptr<struct FsConfig> fs_config; // rpc addresses. Populated when environment is initialized. After that it is read-only accessed extern std::map<uint64_t, hg_addr_t> rpc_addresses; // file descriptor index validation flag Loading Loading
ifs/include/preload/adafs_functions.hpp +0 −1 Original line number Diff line number Diff line #ifndef IFS_ADAFS_FUNCTIONS_HPP #define IFS_ADAFS_FUNCTIONS_HPP #include <preload/preload_util.hpp> #include <preload/open_file_map.hpp> /* Loading
ifs/include/preload/passthrough.hpp +0 −3 Original line number Diff line number Diff line Loading @@ -5,9 +5,6 @@ #ifndef IFS_PASSTHROUGH_HPP #define IFS_PASSTHROUGH_HPP #include <preload/preload.hpp> #include <iostream> // function pointer for preloading extern void* libc; Loading
ifs/include/preload/preload.hpp +0 −2 Original line number Diff line number Diff line Loading @@ -8,8 +8,6 @@ #define CTX PreloadContext::getInstance() bool ld_is_aux_loaded(); void init_ld_env_if_needed(); void init_preload() __attribute__((constructor)); Loading
ifs/include/preload/preload_context.hpp +32 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,31 @@ class OpenFileMap; class Distributor; struct FsConfig { // configurable metadata bool atime_state; bool mtime_state; bool ctime_state; bool uid_state; bool gid_state; bool inode_no_state; bool link_cnt_state; bool blocks_state; uid_t uid; gid_t gid; std::string rootdir; // rpc infos std::map<uint64_t, std::string> hosts; std::map<std::string, std::string> sys_hostfile; uint64_t host_id; // my host number size_t host_size; std::string rpc_port; }; class PreloadContext { private: PreloadContext(); Loading @@ -17,7 +42,10 @@ class PreloadContext { std::shared_ptr<spdlog::logger> log_; std::shared_ptr<OpenFileMap> ofm_; std::shared_ptr<Distributor> distributor_; std::shared_ptr<FsConfig> fs_conf_; std::string mountdir_; bool initialized_; public: static PreloadContext* getInstance() { Loading @@ -40,6 +68,10 @@ class PreloadContext { void distributor(std::shared_ptr<Distributor> distributor); std::shared_ptr<Distributor> distributor() const; const std::shared_ptr<FsConfig>& fs_conf() const; void initialized(const bool& flag); bool initialized() const; }; Loading
ifs/include/preload/preload_util.hpp +0 −27 Original line number Diff line number Diff line Loading @@ -11,31 +11,6 @@ extern "C" { #include <margo.h> } // TODO singleton this stuff away // The contents of FsConfig or only set once when set up struct FsConfig { // configurable metadata bool atime_state; bool mtime_state; bool ctime_state; bool uid_state; bool gid_state; bool inode_no_state; bool link_cnt_state; bool blocks_state; uid_t uid; gid_t gid; std::string rootdir; // rpc infos std::map<uint64_t, std::string> hosts; std::map<std::string, std::string> sys_hostfile; uint64_t host_id; // my host number size_t host_size; std::string rpc_port; }; // Used to bundle metadata into one place struct Metadentry { time_t atime; Loading Loading @@ -95,8 +70,6 @@ extern hg_id_t rpc_update_metadentry_size_id; extern hg_id_t rpc_write_data_id; extern hg_id_t rpc_read_data_id; extern hg_id_t rpc_get_dirents_id; // fs_config is set ONCE in the beginning. It shall not be modified afterwards extern std::shared_ptr<struct FsConfig> fs_config; // rpc addresses. Populated when environment is initialized. After that it is read-only accessed extern std::map<uint64_t, hg_addr_t> rpc_addresses; // file descriptor index validation flag Loading