Loading ifs/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ set(SOURCE_FILES main.cpp main.hpp configure.hpp util.cpp src/rpc/handler/h_metadentry.cpp src/adafs_ops/data.cpp include/adafs_ops/data.hpp src/rpc/handler/h_data.cpp src/rpc/handler/h_preload.cpp include/rpc/rpc_utils.hpp src/rpc/rpc_utils.cpp) include/rpc/rpc_utils.hpp src/rpc/rpc_utils.cpp include/global_defs.hpp) add_executable(adafs_daemon ${SOURCE_FILES}) target_link_libraries(adafs_daemon ${ROCKSDB_LIBRARIES} # rocksdb libs Loading ifs/include/global_defs.hpp 0 → 100644 +19 −0 Original line number Diff line number Diff line // // Created by evie on 11/15/17. // #ifndef IFS_GLOBAL_DEFS_HPP #define IFS_GLOBAL_DEFS_HPP // These definitions set the RPC's identity and which handler the receiver end should use #define IPC_FS_CONFIG_TAG "ipc_srv_fs_config" #define RPC_MINIMAL_TAG "rpc_minimal" #define RPC_OPEN_TAG "rpc_srv_open" #define RPC_STAT_TAG "rpc_srv_stat" #define RPC_UNLINK_TAG "rpc_srv_unlink" #define RPC_UPDATE_METADENTRY_TAG "rpc_srv_update_metadentry" #define RPC_UPDATE_METADENTRY_SIZE_TAG "rpc_srv_update_metadentry_size" #define RPC_WRITE_DATA_TAG "rpc_srv_write_data" #define RPC_READ_DATA_TAG "rpc_srv_read_data" #endif //IFS_GLOBAL_DEFS_HPP ifs/include/preload/margo_ipc.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,6 @@ using namespace std; void send_minimal_ipc(const hg_id_t minimal_id); bool ipc_send_get_fs_config(const hg_id_t ipc_get_config_id); bool ipc_send_get_fs_config(); #endif //IFS_MARGO_IPC_HPP ifs/include/preload/open_file_map.hpp +6 −4 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ private: FILE* tmp_file_; public: OpenFile(const std::string& path, const bool append_flag); OpenFile(const std::string& path, bool append_flag); ~OpenFile(); Loading Loading @@ -46,10 +46,12 @@ public: OpenFileMap(); OpenFile* get(int fd); bool exist(const int fd); int add(std::string path, const bool append); bool remove(const int fd); bool exist(int fd); int add(std::string path, bool append); bool remove(int fd); }; Loading ifs/include/preload/passthrough.hpp 0 → 100644 +55 −0 Original line number Diff line number Diff line // // Created by evie on 11/15/17. // #ifndef IFS_PASSTHROUGH_HPP #define IFS_PASSTHROUGH_HPP #include <preload/preload.hpp> // function pointer for preloading extern void* libc; extern void* libc_open; //extern void* libc_open64; //unused extern void* libc_fopen; // XXX Does not work with streaming pointers. If used will block forever extern void* libc_fopen64; // XXX Does not work with streaming pointers. If used will block forever //extern void* libc_creat; //unused //extern void* libc_creat64; //unused extern void* libc_unlink; extern void* libc_close; //extern void* libc___close; //unused extern void* libc_stat; extern void* libc_fstat; extern void* libc___xstat; extern void* libc___xstat64; extern void* libc___fxstat; extern void* libc___fxstat64; extern void* libc___lxstat; extern void* libc___lxstat64; extern void* libc_access; extern void* libc_puts; extern void* libc_write; extern void* libc_pwrite; extern void* libc_read; extern void* libc_pread; extern void* libc_pread64; extern void* libc_lseek; //extern void* libc_lseek64; //unused extern void* libc_truncate; extern void* libc_ftruncate; extern void* libc_dup; extern void* libc_dup2; void init_passthrough_if_needed(); #endif //IFS_PASSTHROUGH_HPP Loading
ifs/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ set(SOURCE_FILES main.cpp main.hpp configure.hpp util.cpp src/rpc/handler/h_metadentry.cpp src/adafs_ops/data.cpp include/adafs_ops/data.hpp src/rpc/handler/h_data.cpp src/rpc/handler/h_preload.cpp include/rpc/rpc_utils.hpp src/rpc/rpc_utils.cpp) include/rpc/rpc_utils.hpp src/rpc/rpc_utils.cpp include/global_defs.hpp) add_executable(adafs_daemon ${SOURCE_FILES}) target_link_libraries(adafs_daemon ${ROCKSDB_LIBRARIES} # rocksdb libs Loading
ifs/include/global_defs.hpp 0 → 100644 +19 −0 Original line number Diff line number Diff line // // Created by evie on 11/15/17. // #ifndef IFS_GLOBAL_DEFS_HPP #define IFS_GLOBAL_DEFS_HPP // These definitions set the RPC's identity and which handler the receiver end should use #define IPC_FS_CONFIG_TAG "ipc_srv_fs_config" #define RPC_MINIMAL_TAG "rpc_minimal" #define RPC_OPEN_TAG "rpc_srv_open" #define RPC_STAT_TAG "rpc_srv_stat" #define RPC_UNLINK_TAG "rpc_srv_unlink" #define RPC_UPDATE_METADENTRY_TAG "rpc_srv_update_metadentry" #define RPC_UPDATE_METADENTRY_SIZE_TAG "rpc_srv_update_metadentry_size" #define RPC_WRITE_DATA_TAG "rpc_srv_write_data" #define RPC_READ_DATA_TAG "rpc_srv_read_data" #endif //IFS_GLOBAL_DEFS_HPP
ifs/include/preload/margo_ipc.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,6 @@ using namespace std; void send_minimal_ipc(const hg_id_t minimal_id); bool ipc_send_get_fs_config(const hg_id_t ipc_get_config_id); bool ipc_send_get_fs_config(); #endif //IFS_MARGO_IPC_HPP
ifs/include/preload/open_file_map.hpp +6 −4 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ private: FILE* tmp_file_; public: OpenFile(const std::string& path, const bool append_flag); OpenFile(const std::string& path, bool append_flag); ~OpenFile(); Loading Loading @@ -46,10 +46,12 @@ public: OpenFileMap(); OpenFile* get(int fd); bool exist(const int fd); int add(std::string path, const bool append); bool remove(const int fd); bool exist(int fd); int add(std::string path, bool append); bool remove(int fd); }; Loading
ifs/include/preload/passthrough.hpp 0 → 100644 +55 −0 Original line number Diff line number Diff line // // Created by evie on 11/15/17. // #ifndef IFS_PASSTHROUGH_HPP #define IFS_PASSTHROUGH_HPP #include <preload/preload.hpp> // function pointer for preloading extern void* libc; extern void* libc_open; //extern void* libc_open64; //unused extern void* libc_fopen; // XXX Does not work with streaming pointers. If used will block forever extern void* libc_fopen64; // XXX Does not work with streaming pointers. If used will block forever //extern void* libc_creat; //unused //extern void* libc_creat64; //unused extern void* libc_unlink; extern void* libc_close; //extern void* libc___close; //unused extern void* libc_stat; extern void* libc_fstat; extern void* libc___xstat; extern void* libc___xstat64; extern void* libc___fxstat; extern void* libc___fxstat64; extern void* libc___lxstat; extern void* libc___lxstat64; extern void* libc_access; extern void* libc_puts; extern void* libc_write; extern void* libc_pwrite; extern void* libc_read; extern void* libc_pread; extern void* libc_pread64; extern void* libc_lseek; //extern void* libc_lseek64; //unused extern void* libc_truncate; extern void* libc_ftruncate; extern void* libc_dup; extern void* libc_dup2; void init_passthrough_if_needed(); #endif //IFS_PASSTHROUGH_HPP