Commit ea9ba178 authored by Marc Vef's avatar Marc Vef
Browse files

Merge branch '22-migrate-to-margo-0-2'

parents d6abaac0 0955d6bf
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ find_package(ZStd REQUIRED)
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)
+0 −42
Original line number Diff line number Diff line
@@ -13,23 +13,9 @@ class RPCData {
private:
    RPCData() {}

    // Can't use shared pointers here 'cause the Mercury environment has problems with it, e.g., unable to finalize,
    // resulting into a faulty fuse shutdown
    // Mercury RPC server
    hg_class_t* server_rpc_hg_class_;
    hg_context_t* server_rpc_hg_context_;
    // Mercury IPC server with shared memory
    hg_class_t* server_ipc_hg_class_;
    hg_context_t* server_ipc_hg_context_;

    // Mercury Client
    hg_class_t* client_hg_class_;
    hg_context_t* client_hg_context_;

    // Margo IDs. They can also be used to retrieve the Mercury classes and contexts that were created at init time
    margo_instance_id server_rpc_mid_;
    margo_instance_id server_ipc_mid_;
    margo_instance_id client_rpc_mid_;

    lru11::Cache<uint64_t, hg_addr_t> address_cache_{32768, 4096}; // XXX Set values are not based on anything...

@@ -65,30 +51,6 @@ public:

    // Getter/Setter

    hg_class_t* server_rpc_hg_class() const;

    void server_rpc_hg_class(hg_class_t* server_rpc_hg_class);

    hg_context_t* server_rpc_hg_context() const;

    void server_rpc_hg_context(hg_context_t* server_rpc_hg_context);

    hg_class_t* server_ipc_hg_class() const;

    void server_ipc_hg_class(hg_class_t* server_ipc_hg_class);

    hg_context_t* server_ipc_hg_context() const;

    void server_ipc_hg_context(hg_context_t* server_ipc_hg_context);

    hg_class_t* client_hg_class() const;

    void client_hg_class(hg_class_t* client_hg_class);

    hg_context_t* client_hg_context() const;

    void client_hg_context(hg_context_t* client_hg_context);

    margo_instance* server_rpc_mid();

    void server_rpc_mid(margo_instance* server_rpc_mid);
@@ -97,10 +59,6 @@ public:

    void server_ipc_mid(margo_instance* server_ipc_mid);

    margo_instance* client_mid();

    void client_mid(margo_instance* client_mid);

    hg_id_t rpc_minimal_id() const;

    void rpc_minimal_id(hg_id_t rpc_minimal_id);
+0 −4
Original line number Diff line number Diff line
@@ -10,9 +10,6 @@
void init_environment();
void destroy_enviroment();

bool init_argobots();
void destroy_argobots();

bool init_ipc_server();

bool init_rpc_server();
@@ -21,6 +18,5 @@ bool init_rpc_client();

void register_server_ipcs();
void register_server_rpcs();
void register_client_rpcs();

#endif //IFS_ADAFS_DAEMON_HPP
+7 −0
Original line number Diff line number Diff line
@@ -7,6 +7,13 @@

#include <preload/preload.hpp>

extern "C" {
#include <mercury.h>
#include <mercury_types.h>
#include <mercury_proc_string.h>
#include <margo.h>
}

MERCURY_GEN_PROC(ipc_err_out_t, ((hg_int32_t) (err))) // generic return type

MERCURY_GEN_PROC(ipc_config_in_t, ((hg_int32_t) (dummy))) // XXX remove that.
+2 −3
Original line number Diff line number Diff line
@@ -19,9 +19,7 @@

extern "C" {
#include <abt.h>
#include <abt-snoozer.h>
#include <mercury_types.h>
#include <mercury_proc_string.h>
#include <mercury.h>
#include <margo.h>
}

@@ -83,6 +81,7 @@ struct MetadentryUpdateFlags {
// fs_config is set ONCE in the beginning. It shall not be modified afterwards
extern shared_ptr<struct FsConfig> fs_config;

// TODO get rid of that horrible, disgusting logging X.x
extern FILE* debug_fd;

#define LD_LOG_DEBUG(fd, fmt, ...) \
Loading