Loading ifs/CMakeLists.txt +4 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,10 @@ if (NOT USE_OFI_VERBS AND NOT USE_OFI_PSM2 AND NOT USE_CCI AND NOT USE_BMI AND N add_definitions(-DRPC_PROTOCOL="bmi+tcp") endif() option(SYMLINK_SUPPORT "Compile with support for symlinks" ON) if(SYMLINK_SUPPORT) add_compile_definitions(HAS_SYMLINKS) endif() # Imported target add_library(RocksDB INTERFACE IMPORTED GLOBAL) Loading ifs/include/daemon/handler/rpc_defs.hpp +5 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,11 @@ DECLARE_MARGO_RPC_HANDLER(rpc_srv_update_metadentry_size) DECLARE_MARGO_RPC_HANDLER(rpc_srv_get_dirents) #ifdef HAS_SYMLINKS DECLARE_MARGO_RPC_HANDLER(rpc_srv_mk_symlink) #endif // data DECLARE_MARGO_RPC_HANDLER(rpc_srv_read_data) Loading ifs/include/global/global_defs.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,9 @@ namespace hg_tag { constexpr auto get_metadentry_size = "rpc_srv_get_metadentry_size"; constexpr auto update_metadentry_size = "rpc_srv_update_metadentry_size"; constexpr auto get_dirents = "rpc_srv_get_dirents"; #ifdef HAS_SYMLINKS constexpr auto mk_symlink = "rpc_srv_mk_symlink"; #endif constexpr auto write_data = "rpc_srv_write_data"; constexpr auto read_data = "rpc_srv_read_data"; constexpr auto trunc_data = "rpc_srv_trunc_data"; Loading ifs/include/global/metadata.hpp +15 −1 Original line number Diff line number Diff line Loading @@ -5,10 +5,12 @@ #include "global/configure.hpp" #include <sys/types.h> #include <sys/stat.h> #include <string> typedef uint64_t fuid_t; // File Unique ID constexpr mode_t LINK_MODE = ((S_IRWXU | S_IRWXG | S_IRWXO) | S_IFLNK); class Metadata { Loading @@ -23,10 +25,17 @@ private: nlink_t link_count_; // number of names for this inode (hardlinks) size_t size_; // size_ in bytes, might be computed instead of stored blkcnt_t blocks_; // allocated file system blocks_ #ifdef HAS_SYMLINKS std::string target_path_; // For links this is the path of the target file #endif public: Metadata(); Metadata(mode_t mode); explicit Metadata(mode_t mode); #ifdef HAS_SYMLINKS Metadata(mode_t mode, const std::string& target_path); #endif // Construct from a binary representation of the object Metadata(const std::string& binary_str); Loading Loading @@ -56,6 +65,11 @@ public: void size(size_t size_); blkcnt_t blocks() const; void blocks(blkcnt_t blocks_); #ifdef HAS_SYMLINKS std::string target_path() const; void target_path(const std::string& target_path); bool is_link() const; #endif }; Loading ifs/include/global/rpc/rpc_types.hpp +7 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,13 @@ MERCURY_GEN_PROC(rpc_update_metadentry_size_out_t, ((hg_int32_t) (err)) MERCURY_GEN_PROC(rpc_get_metadentry_size_out_t, ((hg_int32_t) (err)) ((hg_int64_t) (ret_size))) #ifdef HAS_SYMLINKS MERCURY_GEN_PROC(rpc_mk_symlink_in_t, ((hg_const_string_t) (path))\ ((hg_const_string_t) (target_path)) ) #endif // data MERCURY_GEN_PROC(rpc_read_data_in_t, ((hg_uint64_t) (fuid))\ Loading Loading
ifs/CMakeLists.txt +4 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,10 @@ if (NOT USE_OFI_VERBS AND NOT USE_OFI_PSM2 AND NOT USE_CCI AND NOT USE_BMI AND N add_definitions(-DRPC_PROTOCOL="bmi+tcp") endif() option(SYMLINK_SUPPORT "Compile with support for symlinks" ON) if(SYMLINK_SUPPORT) add_compile_definitions(HAS_SYMLINKS) endif() # Imported target add_library(RocksDB INTERFACE IMPORTED GLOBAL) Loading
ifs/include/daemon/handler/rpc_defs.hpp +5 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,11 @@ DECLARE_MARGO_RPC_HANDLER(rpc_srv_update_metadentry_size) DECLARE_MARGO_RPC_HANDLER(rpc_srv_get_dirents) #ifdef HAS_SYMLINKS DECLARE_MARGO_RPC_HANDLER(rpc_srv_mk_symlink) #endif // data DECLARE_MARGO_RPC_HANDLER(rpc_srv_read_data) Loading
ifs/include/global/global_defs.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,9 @@ namespace hg_tag { constexpr auto get_metadentry_size = "rpc_srv_get_metadentry_size"; constexpr auto update_metadentry_size = "rpc_srv_update_metadentry_size"; constexpr auto get_dirents = "rpc_srv_get_dirents"; #ifdef HAS_SYMLINKS constexpr auto mk_symlink = "rpc_srv_mk_symlink"; #endif constexpr auto write_data = "rpc_srv_write_data"; constexpr auto read_data = "rpc_srv_read_data"; constexpr auto trunc_data = "rpc_srv_trunc_data"; Loading
ifs/include/global/metadata.hpp +15 −1 Original line number Diff line number Diff line Loading @@ -5,10 +5,12 @@ #include "global/configure.hpp" #include <sys/types.h> #include <sys/stat.h> #include <string> typedef uint64_t fuid_t; // File Unique ID constexpr mode_t LINK_MODE = ((S_IRWXU | S_IRWXG | S_IRWXO) | S_IFLNK); class Metadata { Loading @@ -23,10 +25,17 @@ private: nlink_t link_count_; // number of names for this inode (hardlinks) size_t size_; // size_ in bytes, might be computed instead of stored blkcnt_t blocks_; // allocated file system blocks_ #ifdef HAS_SYMLINKS std::string target_path_; // For links this is the path of the target file #endif public: Metadata(); Metadata(mode_t mode); explicit Metadata(mode_t mode); #ifdef HAS_SYMLINKS Metadata(mode_t mode, const std::string& target_path); #endif // Construct from a binary representation of the object Metadata(const std::string& binary_str); Loading Loading @@ -56,6 +65,11 @@ public: void size(size_t size_); blkcnt_t blocks() const; void blocks(blkcnt_t blocks_); #ifdef HAS_SYMLINKS std::string target_path() const; void target_path(const std::string& target_path); bool is_link() const; #endif }; Loading
ifs/include/global/rpc/rpc_types.hpp +7 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,13 @@ MERCURY_GEN_PROC(rpc_update_metadentry_size_out_t, ((hg_int32_t) (err)) MERCURY_GEN_PROC(rpc_get_metadentry_size_out_t, ((hg_int32_t) (err)) ((hg_int64_t) (ret_size))) #ifdef HAS_SYMLINKS MERCURY_GEN_PROC(rpc_mk_symlink_in_t, ((hg_const_string_t) (path))\ ((hg_const_string_t) (target_path)) ) #endif // data MERCURY_GEN_PROC(rpc_read_data_in_t, ((hg_uint64_t) (fuid))\ Loading