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

write ipcs will not move data but access the memory segments directly

parent 3dadee39
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5,13 +5,13 @@
// To enabled logging with info level
#define LOG_INFO
//#define LOG_DEBUG
//#define LOG_TRACE
#define LOG_TRACE
#define LOG_DAEMON_PATH "/tmp/adafs_daemon.log"

// Enable logging for daemon
#define LOG_PRELOAD_INFO
//#define LOG_PRELOAD_DEBUG
//#define LOG_PRELOAD_TRACE
#define LOG_PRELOAD_TRACE
#define LOG_PRELOAD_PATH "/tmp/adafs_preload.log"

// If ACM time should be considered
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ size_t get_rpc_node(const std::string& to_hash);

bool is_local_op(size_t recipient);

hg_return margo_create_wrap(const hg_id_t ipc_id, const hg_id_t rpc_id, const std::string& path, hg_handle_t& handle,
hg_return margo_create_wrap(hg_id_t ipc_id, hg_id_t rpc_id, const std::string& path, hg_handle_t& handle,
                            hg_addr_t& svr_addr, bool force_rpc);

#endif //IFS_PRELOAD_UTIL_HPP
+2 −1
Original line number Diff line number Diff line
@@ -9,7 +9,8 @@ extern "C" {
}
#include <string>

hg_bool_t bool_to_merc_bool(const bool state);
hg_bool_t bool_to_merc_bool(bool state);

bool is_handle_sm(margo_instance_id mid, const hg_addr_t& addr);

#endif //IFS_RPC_UTILS_HPP
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ int write_chunks(const string& path, const vector<void*>& buf_ptrs, const vector
    write_size = 0;
    // buf sizes also hold chnk ids. we only want to keep calculate the actual chunks
    auto chnk_n = buf_sizes.size() / 2;
    for (int i = 0; i < chnk_n; i++) {
    for (size_t i = 0; i < chnk_n; i++) {
        auto chnk_id = *(static_cast<size_t*>(buf_ptrs[i * 2]));
        auto chnk_ptr = static_cast<char*>(buf_ptrs[(i * 2) + 1]);
        auto chnk_size = buf_sizes[(i * 2) + 1];
+2 −2
Original line number Diff line number Diff line
@@ -229,7 +229,7 @@ ssize_t pwrite(int fd, const void* buf, size_t count, off_t offset) {
        auto adafs_fd = file_map.get(fd);
        auto path = adafs_fd->path();
        auto append_flag = adafs_fd->append_flag();
        size_t write_size;
        size_t write_size;// XXX use after abt eventual is used
        int err = 0;
        long updated_size = 0;

@@ -296,7 +296,7 @@ ssize_t pwrite(int fd, const void* buf, size_t count, off_t offset) {
//            ld_logger->error("{}() write failed", __func__);
//            return 0;
//        }
//        return write_size; // XXX use after abt eventual is used
//        return write_size;
        return count;
    }
    return (reinterpret_cast<decltype(&pwrite)>(libc_pwrite))(fd, buf, count, offset);
Loading