Verified Commit 73a1a1e3 authored by Marc Vef's avatar Marc Vef
Browse files

Added remove metadata through proxy

parent 4fe924aa
Loading
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -14,8 +14,7 @@
#ifndef GEKKOFS_FORWARD_METADATA_PROXY_HPP
#define GEKKOFS_FORWARD_METADATA_PROXY_HPP

namespace gkfs {
namespace rpc {
namespace gkfs::rpc {

int
forward_create_proxy(const std::string& path, const mode_t mode);
@@ -23,7 +22,9 @@ forward_create_proxy(const std::string& path, const mode_t mode);
int
forward_stat_proxy(const std::string& path, std::string& attr);

} // namespace rpc
} // namespace gkfs
int
forward_remove_proxy(const std::string& path);

} // namespace gkfs::rpc

#endif // GEKKOFS_FORWARD_METADATA_PROXY_HPP
+1 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ namespace proxy {
constexpr auto pid_path = "/tmp/gkfs_proxy.pid";
constexpr auto fwd_create = true;
constexpr auto fwd_stat = true;
constexpr auto fwd_remove = true;
constexpr auto fwd_io = true;
// Only use proxy for io if write/read size is higher than set value
constexpr auto fwd_io_count_threshold = 4000;
+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ constexpr auto write = "rpc_srv_write_data";
constexpr auto read = "rpc_srv_read_data";
constexpr auto truncate = "rpc_srv_trunc_data";
constexpr auto get_chunk_stat = "rpc_srv_chunk_stat";
// IPC communication between client and proxy
constexpr auto proxy_create = "proxy_rpc_srv_create";
constexpr auto proxy_stat = "proxy_rpc_srv_stat";
constexpr auto proxy_remove = "proxy_rpc_srv_remove";
+8 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ struct margo_client_ids {
    hg_id_t rpc_create_id;
    hg_id_t rpc_stat_id;
    hg_id_t rpc_remove_id;
    hg_id_t rpc_remove_data_id;
    hg_id_t rpc_write_id;
    hg_id_t rpc_read_id;
};
@@ -48,6 +49,7 @@ private:
    bool use_auto_sm_{false};

    std::map<uint64_t, hg_addr_t> rpc_endpoints_;
    uint64_t hosts_size_;
    uint64_t local_host_id_;

    margo_client_ids rpc_client_ids_{};
@@ -107,6 +109,12 @@ public:
    void
    rpc_endpoints(const std::map<uint64_t, hg_addr_t>& rpc_endpoints);

    uint64_t
    hosts_size() const;

    void
    hosts_size(uint64_t hosts_size);

    uint64_t
    local_host_id() const;

+5 −4
Original line number Diff line number Diff line
@@ -16,8 +16,7 @@

#include <proxy/proxy.hpp>

namespace gkfs {
namespace rpc {
namespace gkfs::rpc {

int
forward_create(const std::string& path, const mode_t mode);
@@ -25,8 +24,10 @@ forward_create(const std::string& path, const mode_t mode);
std::pair<int, std::string>
forward_stat(const std::string& path);

} // namespace rpc
} // namespace gkfs
int
forward_remove(const std::string& path);

} // namespace gkfs::rpc


#endif // GEKKOFS_PROXY_FORWARD_METADATA_HPP
Loading