Commit 18b08f51 authored by Jean Bez's avatar Jean Bez
Browse files

Fix merge conflicts

parent 31c48446
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -142,6 +142,17 @@ if(ENABLE_CLIENT_LOG)
    add_definitions(-DGKFS_ENABLE_LOGGING)
endif()
message(STATUS "[gekkofs] Client logging output: ${ENABLE_CLIENT_LOG}")
option(ENABLE_FORWARDING "Enable forwarding mode" OFF)
if(ENABLE_FORWARDING)
    add_definitions(-DGKFS_ENABLE_FORWARDING)
endif()
message(STATUS "[gekkofs] Forwarding mode: ${ENABLE_FORWARDING}")

option(ENABLE_AGIOS "Enable AGIOS scheduling library" OFF)
if(ENABLE_AGIOS)
    add_definitions(-DGKFS_ENABLE_AGIOS)
endif()
message(STATUS "[gekkofs] AGIOS scheduling: ${ENABLE_AGIOS}")

option(GKFS_ENABLE_FORWARDING "Enable forwarding mode" OFF)
option(GKFS_ENABLE_AGIOS "Enable AGIOS scheduling library" OFF)
+1 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ RUN yum -y -q update && yum -y -q install \
	automake \
	cmake \
	cmake3 \
	sudo \
	gcc \
	gcc-c++ \
	openssl-devel \
+4 −0
Original line number Diff line number Diff line
@@ -531,7 +531,11 @@ ssize_t gkfs_read(int fd, void* buf, size_t count) {
ssize_t gkfs_preadv(int fd, const struct iovec* iov, int iovcnt, off_t offset) {

    auto file = CTX->file_map()->get(fd);
<<<<<<< Updated upstream
    auto pos = offset; // keep track of current position
=======
    auto pos = offset; // keep truck of current position
>>>>>>> Stashed changes
    ssize_t read = 0;
    ssize_t ret;
    for (int i = 0; i < iovcnt; ++i) {
+40 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ namespace {
// make sure that things are only initialized once
pthread_once_t init_env_thread = PTHREAD_ONCE_INIT;

<<<<<<< Updated upstream
#ifdef GKFS_ENABLE_FORWARDING
pthread_t mapper;
bool forwarding_running;
@@ -43,6 +44,10 @@ bool forwarding_running;
pthread_mutex_t remap_mutex;
pthread_cond_t remap_signal;
#endif
=======
pthread_t mapper;
bool forwarding_running;
>>>>>>> Stashed changes

inline void exit_error_msg(int errcode, const string& msg) {

@@ -132,6 +137,7 @@ void init_ld_environment_() {
}

#ifdef GKFS_ENABLE_FORWARDING
<<<<<<< Updated upstream
void *forwarding_mapper(void* p) {
    struct timespec timeout;
    clock_gettime(CLOCK_REALTIME, &timeout);
@@ -139,10 +145,14 @@ void *forwarding_mapper(void* p) {

    int previous = -1;

=======
void *forwarding_mapper(void *p) {
>>>>>>> Stashed changes
    while (forwarding_running) {
        try {
            gkfs::util::load_forwarding_map();

<<<<<<< Updated upstream
            if (previous != CTX->fwd_host_id()) {
                LOG(INFO, "{}() Forward to {}", __func__, CTX->fwd_host_id());

@@ -162,11 +172,25 @@ void *forwarding_mapper(void* p) {
#endif

#ifdef GKFS_ENABLE_FORWARDING
=======
            LOG(INFO, "{}() Forward to {}", __func__, CTX->fwd_host_id());
        } catch (std::exception& e){
            exit_error_msg(EXIT_FAILURE, fmt::format("Unable set the forwarding host '{}'", e.what()));
        }

        // Sleeps for 10 seconds
        sleep(10);
    }
}
#endif

>>>>>>> Stashed changes
void init_forwarding_mapper() {
    forwarding_running = true;

    pthread_create(&mapper, NULL, forwarding_mapper, NULL);
}
<<<<<<< Updated upstream
#endif

#ifdef GKFS_ENABLE_FORWARDING
@@ -178,6 +202,14 @@ void destroy_forwarding_mapper() {
    pthread_join(mapper, NULL);
}
#endif
=======

void destroy_forwarding_mapper() {
    forwarding_running = false;

    pthread_join(mapper, NULL);
}
>>>>>>> Stashed changes

void log_prog_name() {
    std::string line;
@@ -238,9 +270,13 @@ void init_preload() {

    CTX->unprotect_user_fds();

<<<<<<< Updated upstream
    #ifdef GKFS_ENABLE_FORWARDING
    init_forwarding_mapper();
    #endif
=======
    init_forwarding_mapper();
>>>>>>> Stashed changes

    gkfs::preload::start_interception();
}
@@ -249,9 +285,13 @@ void init_preload() {
 * Called last when preload library is used with the LD_PRELOAD environment variable
 */
void destroy_preload() {
<<<<<<< Updated upstream
    #ifdef GKFS_ENABLE_FORWARDING
    destroy_forwarding_mapper();
    #endif
=======
    destroy_forwarding_mapper();
>>>>>>> Stashed changes

    CTX->clear_hosts();
    LOG(DEBUG, "Peer information deleted");
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ set(DAEMON_SRC
    handler/srv_metadata.cpp
    handler/srv_data.cpp
    handler/srv_management.cpp
    scheduler/agios.cpp
    )
set(DAEMON_HEADERS
    ../../include/config.hpp
@@ -23,6 +24,7 @@ set(DAEMON_HEADERS
    ../../include/global/path_util.hpp
    ../../include/daemon/daemon.hpp
    ../../include/daemon/util.hpp
    ../../include/daemon/scheduler/agios.hpp
    ../../include/daemon/ops/metadentry.hpp
    ../../include/daemon/classes/fs_data.hpp
    ../../include/daemon/classes/rpc_data.hpp
@@ -40,6 +42,7 @@ target_link_libraries(gkfs_daemon
    env_util
    spdlog
    fmt::fmt
    ${AGIOS_LIBRARIES}
    # margo libs
    ${ABT_LIBRARIES}
    mercury
@@ -53,6 +56,7 @@ target_link_libraries(gkfs_daemon

target_include_directories(gkfs_daemon
    PRIVATE
    ${AGIOS_INCLUDE_DIRS}
    ${ABT_INCLUDE_DIRS}
    ${MARGO_INCLUDE_DIRS}
    )
Loading