Resolve "Set RPC protocol and auto_sm at runtime and not compile time"

Edited by Marc Vef

Merge request reports

Loading
+1 −0
Changes for include/client/rpc/forward_metadata.hpp: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ class OpenDir;
}
namespace metadata {
struct MetadentryUpdateFlags;

class Metadata;
}

+4 −1
Changes for include/client/gkfs_functions.hpp: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -42,7 +42,10 @@ int gkfs_stat(const std::string& path, struct stat* buf, bool follow_links = tru
// Implementation of statx, it uses the normal stat and maps the information to the statx structure
// Follow links is true by default 
#ifdef STATX_TYPE
int gkfs_statx(int dirfd, const std::string& path, int flags, unsigned int mask,struct statx* buf, bool follow_links = true );

int gkfs_statx(int dirfd, const std::string& path, int flags, unsigned int mask, struct statx* buf,
               bool follow_links = true);

#endif

int gkfs_statfs(struct statfs* buf);
+3 −3

File changed.

Contains only whitespace changes.

+10 −1
Changes for include/client/preload_context.hpp: 10 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -83,6 +83,8 @@ private:
    std::vector<hermes::endpoint> hosts_;
    uint64_t local_host_id_;
    uint64_t fwd_host_id_;
    std::string rpc_protocol_;
    bool auto_sm_{false};

    bool interception_enabled_;

@@ -119,7 +121,6 @@ public:

    void clear_hosts();


    uint64_t local_host_id() const;

    void local_host_id(uint64_t id);
@@ -128,6 +129,14 @@ public:

    void fwd_host_id(uint64_t id);

    const std::string& rpc_protocol() const;

    void rpc_protocol(const std::string& rpc_protocol);

    bool auto_sm() const;

    void auto_sm(bool auto_sm);

    RelativizeStatus relativize_fd_path(int dirfd,
                                        const char* raw_path,
                                        std::string& relative_path,
+5 −2
Changes for include/client/preload_util.hpp: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -59,11 +59,14 @@ std::shared_ptr<gkfs::metadata::Metadata> get_metadata(const std::string& path,

int metadata_to_stat(const std::string& path, const gkfs::metadata::Metadata& md, struct stat& attr);

std::vector<std::pair<std::string, std::string>> load_hostfile(const std::string& lfpath);

void load_hosts();

void load_forwarding_map();

std::vector<std::pair<std::string, std::string>> read_hosts_file();

void connect_to_hosts(const std::vector<std::pair<std::string, std::string>>& hosts);

} // namespace util
} // namespace gkfs

Loading
Loading