Loading lfs/CMake/FindBMI.cmake 0 → 100644 +41 −0 Original line number Diff line number Diff line find_path(BMI_DIR HINTS /usr /usr/local /usr/local/adafs/ $ENV{HOME}/adafs/install $ENV{HOME}/adafs/install ) find_path(BMI_INCLUDE_DIR bmi.h HINTS $ENV{HOME}/adafs/install $ENV{HOME}/adafs/install /usr /usr/local /usr/local/adafs ${BMI_DIR} PATH_SUFFIXES include ) find_library(BMI_LIBRARY bmi HINTS $ENV{HOME}/adafs/install/lib /usr /usr/local /usr/local/adafs ${BMI_DIR} ) set(BMI_INCLUDE_DIRS ${BMI_INCLUDE_DIR}) set(BMI_LIBRARIES ${BMI_LIBRARY}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(BMI DEFAULT_MSG BMI_LIBRARY BMI_INCLUDE_DIR) mark_as_advanced( BMI_DIR BMI_LIBRARY BMI_INCLUDE_DIR ) No newline at end of file lfs/CMakeLists.txt +13 −10 Original line number Diff line number Diff line Loading @@ -26,19 +26,20 @@ find_package(RocksDB REQUIRED) # margo dependencies find_package(Libev REQUIRED) find_package(CCI REQUIRED) #find_package(BMI REQUIRED) find_package(Mercury REQUIRED) find_package(MercuryUtil REQUIRED) find_package(Abt REQUIRED) find_package(Abt-Snoozer REQUIRED) find_package(Margo REQUIRED) # Optional dependencies find_package(AbtIO) option(WITH_AbtIO "AbtIO enabled" ON) if (WITH_AbtIO) add_definitions(-DUSE_AbtIO=1) else () add_definitions(-DUSE_AbtIO=0) endif () #find_package(AbtIO) #option(WITH_AbtIO "AbtIO enabled" ON) #if (WITH_AbtIO) # add_definitions(-DUSE_AbtIO=1) #else () # add_definitions(-DUSE_AbtIO=0) #endif () # boost dependencies, system is required for filesystem #TODO VERSION UNTESTED. I USE 1.62 Loading @@ -56,7 +57,8 @@ set(SOURCE_FILES src/main.cpp src/main.hpp src/fuse_ops.hpp src/configure.hpp # db header src/db/db_ops.hpp src/db/db_txn_ops.hpp src/db/db_util.hpp # rpc header src/rpc/rpcs_test.hpp src/rpc/rpc_util_test.hpp src/rpc/rpc_util.hpp src/rpc/rpc_types.hpp src/rpc/rpc_defs.hpp src/rpc/rpc_util.hpp src/rpc/rpc_types.hpp src/rpc/rpc_defs.hpp # rpcs header src/rpc/client/c_metadata.hpp Loading @@ -71,7 +73,8 @@ set(SOURCE_FILES src/main.cpp src/main.hpp src/fuse_ops.hpp src/configure.hpp # db src src/db/db_ops.cpp src/db/db_txn_ops.cpp src/db/db_util.cpp # rpc src src/rpc/rpc_util_test.cpp src/rpc/rpcs_test.cpp src/rpc/rpc_util.cpp src/rpc/rpc_util.cpp # rpcs src src/rpc/server/s_metadata.cpp src/rpc/client/c_metadata.cpp ) Loading @@ -80,5 +83,5 @@ target_link_libraries(adafs ${FUSE3_LIBRARIES} ${ROCKSDB_LIBRARIES} # rocksdb libs ${snappy_LIBRARIES} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${ZSTD_LIBRARIES} ${gflags_LIBRARIES} ${LZ4_LIBRARY} # margo libs ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES} ${ABT_SNOOZER_LIBRARIES} ${ABT_IO_LIBRARIES} ${MARGO_LIBRARIES} ${CCI_LIBRARIES} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES} ${ABT_SNOOZER_LIBRARIES} ${ABT_IO_LIBRARIES} ${MARGO_LIBRARIES} -lpthread -lboost_system -lboost_filesystem -lboost_serialization -pg) lfs/src/classes/fs_data.hpp +4 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,10 @@ public: // mutex has a deleted method to assign an existing mutex. As such it cannot use getter or setters std::mutex inode_mutex; std::mutex m; std::condition_variable cv; static FsData* getInstance() { static FsData instance; return &instance; Loading lfs/src/classes/rpc_data.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -30,12 +30,15 @@ private: // RPC client IDs hg_id_t rpc_minimal_id_; public: static RPCData* getInstance() { static RPCData instance; return &instance; } hg_addr_t svr_addr_ = HG_ADDR_NULL; // XXX TEMPORARY! server addresses will be put into a LRU map RPCData(RPCData const&) = delete; void operator=(RPCData const&) = delete; Loading lfs/src/fuse_ops/file.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -2,12 +2,14 @@ // Created by evie on 4/6/17. // #include <mercury_types.h> #include "../main.hpp" #include "../fuse_ops.hpp" #include "../adafs_ops/mdata_ops.hpp" #include "../adafs_ops/dentry_ops.hpp" #include "../adafs_ops/access.hpp" #include "../adafs_ops/io.hpp" #include "../rpc/client/c_metadata.hpp" using namespace std; Loading Loading @@ -164,6 +166,16 @@ void adafs_ll_setattr(fuse_req_t req, fuse_ino_t ino, struct stat* attr, int to_ */ void adafs_ll_create(fuse_req_t req, fuse_ino_t parent, const char* name, mode_t mode, struct fuse_file_info* fi) { ADAFS_DATA->spdlogger()->debug("adafs_ll_create() enter: parent_inode {} name {} mode {:o}", parent, name, mode); // XXX Below rpc example. Temporary of course // using ns = chrono::nanoseconds; // using get_time = chrono::steady_clock; // auto start_t = get_time::now(); // send_minimal_rpc(nullptr); // auto end_t = get_time::now(); // auto diff = end_t - start_t; // // auto diff_count = chrono::duration_cast<ns>(diff).count(); // ADAFS_DATA->spdlogger()->info("TIME SPENT: {} microseconds", (diff_count / 1000)); auto fep = make_shared<fuse_entry_param>(); Loading Loading
lfs/CMake/FindBMI.cmake 0 → 100644 +41 −0 Original line number Diff line number Diff line find_path(BMI_DIR HINTS /usr /usr/local /usr/local/adafs/ $ENV{HOME}/adafs/install $ENV{HOME}/adafs/install ) find_path(BMI_INCLUDE_DIR bmi.h HINTS $ENV{HOME}/adafs/install $ENV{HOME}/adafs/install /usr /usr/local /usr/local/adafs ${BMI_DIR} PATH_SUFFIXES include ) find_library(BMI_LIBRARY bmi HINTS $ENV{HOME}/adafs/install/lib /usr /usr/local /usr/local/adafs ${BMI_DIR} ) set(BMI_INCLUDE_DIRS ${BMI_INCLUDE_DIR}) set(BMI_LIBRARIES ${BMI_LIBRARY}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(BMI DEFAULT_MSG BMI_LIBRARY BMI_INCLUDE_DIR) mark_as_advanced( BMI_DIR BMI_LIBRARY BMI_INCLUDE_DIR ) No newline at end of file
lfs/CMakeLists.txt +13 −10 Original line number Diff line number Diff line Loading @@ -26,19 +26,20 @@ find_package(RocksDB REQUIRED) # margo dependencies find_package(Libev REQUIRED) find_package(CCI REQUIRED) #find_package(BMI REQUIRED) find_package(Mercury REQUIRED) find_package(MercuryUtil REQUIRED) find_package(Abt REQUIRED) find_package(Abt-Snoozer REQUIRED) find_package(Margo REQUIRED) # Optional dependencies find_package(AbtIO) option(WITH_AbtIO "AbtIO enabled" ON) if (WITH_AbtIO) add_definitions(-DUSE_AbtIO=1) else () add_definitions(-DUSE_AbtIO=0) endif () #find_package(AbtIO) #option(WITH_AbtIO "AbtIO enabled" ON) #if (WITH_AbtIO) # add_definitions(-DUSE_AbtIO=1) #else () # add_definitions(-DUSE_AbtIO=0) #endif () # boost dependencies, system is required for filesystem #TODO VERSION UNTESTED. I USE 1.62 Loading @@ -56,7 +57,8 @@ set(SOURCE_FILES src/main.cpp src/main.hpp src/fuse_ops.hpp src/configure.hpp # db header src/db/db_ops.hpp src/db/db_txn_ops.hpp src/db/db_util.hpp # rpc header src/rpc/rpcs_test.hpp src/rpc/rpc_util_test.hpp src/rpc/rpc_util.hpp src/rpc/rpc_types.hpp src/rpc/rpc_defs.hpp src/rpc/rpc_util.hpp src/rpc/rpc_types.hpp src/rpc/rpc_defs.hpp # rpcs header src/rpc/client/c_metadata.hpp Loading @@ -71,7 +73,8 @@ set(SOURCE_FILES src/main.cpp src/main.hpp src/fuse_ops.hpp src/configure.hpp # db src src/db/db_ops.cpp src/db/db_txn_ops.cpp src/db/db_util.cpp # rpc src src/rpc/rpc_util_test.cpp src/rpc/rpcs_test.cpp src/rpc/rpc_util.cpp src/rpc/rpc_util.cpp # rpcs src src/rpc/server/s_metadata.cpp src/rpc/client/c_metadata.cpp ) Loading @@ -80,5 +83,5 @@ target_link_libraries(adafs ${FUSE3_LIBRARIES} ${ROCKSDB_LIBRARIES} # rocksdb libs ${snappy_LIBRARIES} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${ZSTD_LIBRARIES} ${gflags_LIBRARIES} ${LZ4_LIBRARY} # margo libs ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES} ${ABT_SNOOZER_LIBRARIES} ${ABT_IO_LIBRARIES} ${MARGO_LIBRARIES} ${CCI_LIBRARIES} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES} ${ABT_SNOOZER_LIBRARIES} ${ABT_IO_LIBRARIES} ${MARGO_LIBRARIES} -lpthread -lboost_system -lboost_filesystem -lboost_serialization -pg)
lfs/src/classes/fs_data.hpp +4 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,10 @@ public: // mutex has a deleted method to assign an existing mutex. As such it cannot use getter or setters std::mutex inode_mutex; std::mutex m; std::condition_variable cv; static FsData* getInstance() { static FsData instance; return &instance; Loading
lfs/src/classes/rpc_data.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -30,12 +30,15 @@ private: // RPC client IDs hg_id_t rpc_minimal_id_; public: static RPCData* getInstance() { static RPCData instance; return &instance; } hg_addr_t svr_addr_ = HG_ADDR_NULL; // XXX TEMPORARY! server addresses will be put into a LRU map RPCData(RPCData const&) = delete; void operator=(RPCData const&) = delete; Loading
lfs/src/fuse_ops/file.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -2,12 +2,14 @@ // Created by evie on 4/6/17. // #include <mercury_types.h> #include "../main.hpp" #include "../fuse_ops.hpp" #include "../adafs_ops/mdata_ops.hpp" #include "../adafs_ops/dentry_ops.hpp" #include "../adafs_ops/access.hpp" #include "../adafs_ops/io.hpp" #include "../rpc/client/c_metadata.hpp" using namespace std; Loading Loading @@ -164,6 +166,16 @@ void adafs_ll_setattr(fuse_req_t req, fuse_ino_t ino, struct stat* attr, int to_ */ void adafs_ll_create(fuse_req_t req, fuse_ino_t parent, const char* name, mode_t mode, struct fuse_file_info* fi) { ADAFS_DATA->spdlogger()->debug("adafs_ll_create() enter: parent_inode {} name {} mode {:o}", parent, name, mode); // XXX Below rpc example. Temporary of course // using ns = chrono::nanoseconds; // using get_time = chrono::steady_clock; // auto start_t = get_time::now(); // send_minimal_rpc(nullptr); // auto end_t = get_time::now(); // auto diff = end_t - start_t; // // auto diff_count = chrono::duration_cast<ns>(diff).count(); // ADAFS_DATA->spdlogger()->info("TIME SPENT: {} microseconds", (diff_count / 1000)); auto fep = make_shared<fuse_entry_param>(); Loading