Loading src/client/rpc/forward_data.cpp +22 −0 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,12 @@ forward_write(const string& path, const void* buf, const bool append_flag, const off64_t in_offset, const size_t write_size, const off64_t in_offset, const size_t write_size, const int64_t updated_metadentry_size) { const int64_t updated_metadentry_size) { if(gkfs::config::proxy::fwd_io && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used! Note: io threshold '{}' and rpc write size '{}'", __func__, gkfs::config::proxy::fwd_io, write_size); } // import pow2-optimized arithmetic functions // import pow2-optimized arithmetic functions using namespace gkfs::utils::arithmetic; using namespace gkfs::utils::arithmetic; Loading Loading @@ -247,6 +253,12 @@ pair<int, ssize_t> forward_read(const string& path, void* buf, const off64_t offset, forward_read(const string& path, void* buf, const off64_t offset, const size_t read_size) { const size_t read_size) { if(gkfs::config::proxy::fwd_io && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used! Note: io threshold '{}' and rpc read size '{}'", __func__, gkfs::config::proxy::fwd_io, read_size); } // import pow2-optimized arithmetic functions // import pow2-optimized arithmetic functions using namespace gkfs::utils::arithmetic; using namespace gkfs::utils::arithmetic; Loading Loading @@ -428,6 +440,11 @@ int forward_truncate(const std::string& path, size_t current_size, forward_truncate(const std::string& path, size_t current_size, size_t new_size) { size_t new_size) { if(CTX->use_proxy()) { LOG(WARNING, "{} is run due to missing proxy implementation!", __func__); } // import pow2-optimized arithmetic functions // import pow2-optimized arithmetic functions using namespace gkfs::utils::arithmetic; using namespace gkfs::utils::arithmetic; Loading Loading @@ -502,6 +519,11 @@ forward_truncate(const std::string& path, size_t current_size, pair<int, ChunkStat> pair<int, ChunkStat> forward_get_chunk_stat() { forward_get_chunk_stat() { if(gkfs::config::proxy::fwd_chunk_stat && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used!", __func__); } std::vector<hermes::rpc_handle<gkfs::rpc::chunk_stat>> handles; std::vector<hermes::rpc_handle<gkfs::rpc::chunk_stat>> handles; auto err = 0; auto err = 0; Loading src/client/rpc/forward_metadata.cpp +40 −0 Original line number Original line Diff line number Diff line Loading @@ -56,6 +56,11 @@ namespace gkfs::rpc { int int forward_create(const std::string& path, const mode_t mode) { forward_create(const std::string& path, const mode_t mode) { if(gkfs::config::proxy::fwd_create && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); try { try { Loading Loading @@ -86,6 +91,11 @@ forward_create(const std::string& path, const mode_t mode) { int int forward_stat(const std::string& path, string& attr) { forward_stat(const std::string& path, string& attr) { if(gkfs::config::proxy::fwd_stat && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); try { try { Loading Loading @@ -126,6 +136,11 @@ forward_stat(const std::string& path, string& attr) { int int forward_remove(const std::string& path) { forward_remove(const std::string& path) { if(gkfs::config::proxy::fwd_remove && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); int64_t size = 0; int64_t size = 0; uint32_t mode = 0; uint32_t mode = 0; Loading Loading @@ -265,6 +280,11 @@ forward_remove(const std::string& path) { int int forward_decr_size(const std::string& path, size_t length) { forward_decr_size(const std::string& path, size_t length) { if(CTX->use_proxy()) { LOG(WARNING, "{} is run due to missing proxy implementation!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); try { try { Loading Loading @@ -354,6 +374,11 @@ pair<int, off64_t> forward_update_metadentry_size(const string& path, const size_t size, forward_update_metadentry_size(const string& path, const size_t size, const off64_t offset, const bool append_flag) { const off64_t offset, const bool append_flag) { if(gkfs::config::proxy::fwd_update_size && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); try { try { LOG(DEBUG, "Sending RPC ..."); LOG(DEBUG, "Sending RPC ..."); Loading Loading @@ -390,6 +415,11 @@ forward_update_metadentry_size(const string& path, const size_t size, pair<int, off64_t> pair<int, off64_t> forward_get_metadentry_size(const std::string& path) { forward_get_metadentry_size(const std::string& path) { if(CTX->use_proxy()) { LOG(WARNING, "{} is run due to missing proxy implementation!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); try { try { Loading Loading @@ -424,6 +454,11 @@ forward_get_metadentry_size(const std::string& path) { pair<int, shared_ptr<gkfs::filemap::OpenDir>> pair<int, shared_ptr<gkfs::filemap::OpenDir>> forward_get_dirents(const string& path) { forward_get_dirents(const string& path) { if(CTX->use_proxy()) { LOG(WARNING, "{} is run due to missing proxy implementation!", __func__); } LOG(DEBUG, "{}() enter for path '{}'", __func__, path) LOG(DEBUG, "{}() enter for path '{}'", __func__, path) auto const targets = CTX->distributor()->locate_directory_metadata(path); auto const targets = CTX->distributor()->locate_directory_metadata(path); Loading Loading @@ -570,6 +605,11 @@ forward_get_dirents(const string& path) { pair<int, vector<tuple<const std::string, bool, size_t, time_t>>> pair<int, vector<tuple<const std::string, bool, size_t, time_t>>> forward_get_dirents_single(const string& path, int server) { forward_get_dirents_single(const string& path, int server) { if(CTX->use_proxy()) { LOG(WARNING, "{} is run due to missing proxy implementation!", __func__); } LOG(DEBUG, "{}() enter for path '{}'", __func__, path) LOG(DEBUG, "{}() enter for path '{}'", __func__, path) auto const targets = CTX->distributor()->locate_directory_metadata(path); auto const targets = CTX->distributor()->locate_directory_metadata(path); Loading Loading
src/client/rpc/forward_data.cpp +22 −0 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,12 @@ forward_write(const string& path, const void* buf, const bool append_flag, const off64_t in_offset, const size_t write_size, const off64_t in_offset, const size_t write_size, const int64_t updated_metadentry_size) { const int64_t updated_metadentry_size) { if(gkfs::config::proxy::fwd_io && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used! Note: io threshold '{}' and rpc write size '{}'", __func__, gkfs::config::proxy::fwd_io, write_size); } // import pow2-optimized arithmetic functions // import pow2-optimized arithmetic functions using namespace gkfs::utils::arithmetic; using namespace gkfs::utils::arithmetic; Loading Loading @@ -247,6 +253,12 @@ pair<int, ssize_t> forward_read(const string& path, void* buf, const off64_t offset, forward_read(const string& path, void* buf, const off64_t offset, const size_t read_size) { const size_t read_size) { if(gkfs::config::proxy::fwd_io && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used! Note: io threshold '{}' and rpc read size '{}'", __func__, gkfs::config::proxy::fwd_io, read_size); } // import pow2-optimized arithmetic functions // import pow2-optimized arithmetic functions using namespace gkfs::utils::arithmetic; using namespace gkfs::utils::arithmetic; Loading Loading @@ -428,6 +440,11 @@ int forward_truncate(const std::string& path, size_t current_size, forward_truncate(const std::string& path, size_t current_size, size_t new_size) { size_t new_size) { if(CTX->use_proxy()) { LOG(WARNING, "{} is run due to missing proxy implementation!", __func__); } // import pow2-optimized arithmetic functions // import pow2-optimized arithmetic functions using namespace gkfs::utils::arithmetic; using namespace gkfs::utils::arithmetic; Loading Loading @@ -502,6 +519,11 @@ forward_truncate(const std::string& path, size_t current_size, pair<int, ChunkStat> pair<int, ChunkStat> forward_get_chunk_stat() { forward_get_chunk_stat() { if(gkfs::config::proxy::fwd_chunk_stat && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used!", __func__); } std::vector<hermes::rpc_handle<gkfs::rpc::chunk_stat>> handles; std::vector<hermes::rpc_handle<gkfs::rpc::chunk_stat>> handles; auto err = 0; auto err = 0; Loading
src/client/rpc/forward_metadata.cpp +40 −0 Original line number Original line Diff line number Diff line Loading @@ -56,6 +56,11 @@ namespace gkfs::rpc { int int forward_create(const std::string& path, const mode_t mode) { forward_create(const std::string& path, const mode_t mode) { if(gkfs::config::proxy::fwd_create && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); try { try { Loading Loading @@ -86,6 +91,11 @@ forward_create(const std::string& path, const mode_t mode) { int int forward_stat(const std::string& path, string& attr) { forward_stat(const std::string& path, string& attr) { if(gkfs::config::proxy::fwd_stat && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); try { try { Loading Loading @@ -126,6 +136,11 @@ forward_stat(const std::string& path, string& attr) { int int forward_remove(const std::string& path) { forward_remove(const std::string& path) { if(gkfs::config::proxy::fwd_remove && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); int64_t size = 0; int64_t size = 0; uint32_t mode = 0; uint32_t mode = 0; Loading Loading @@ -265,6 +280,11 @@ forward_remove(const std::string& path) { int int forward_decr_size(const std::string& path, size_t length) { forward_decr_size(const std::string& path, size_t length) { if(CTX->use_proxy()) { LOG(WARNING, "{} is run due to missing proxy implementation!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); try { try { Loading Loading @@ -354,6 +374,11 @@ pair<int, off64_t> forward_update_metadentry_size(const string& path, const size_t size, forward_update_metadentry_size(const string& path, const size_t size, const off64_t offset, const bool append_flag) { const off64_t offset, const bool append_flag) { if(gkfs::config::proxy::fwd_update_size && CTX->use_proxy()) { LOG(WARNING, "{} was called even though proxy should be used!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); try { try { LOG(DEBUG, "Sending RPC ..."); LOG(DEBUG, "Sending RPC ..."); Loading Loading @@ -390,6 +415,11 @@ forward_update_metadentry_size(const string& path, const size_t size, pair<int, off64_t> pair<int, off64_t> forward_get_metadentry_size(const std::string& path) { forward_get_metadentry_size(const std::string& path) { if(CTX->use_proxy()) { LOG(WARNING, "{} is run due to missing proxy implementation!", __func__); } auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); auto endp = CTX->hosts().at(CTX->distributor()->locate_file_metadata(path)); try { try { Loading Loading @@ -424,6 +454,11 @@ forward_get_metadentry_size(const std::string& path) { pair<int, shared_ptr<gkfs::filemap::OpenDir>> pair<int, shared_ptr<gkfs::filemap::OpenDir>> forward_get_dirents(const string& path) { forward_get_dirents(const string& path) { if(CTX->use_proxy()) { LOG(WARNING, "{} is run due to missing proxy implementation!", __func__); } LOG(DEBUG, "{}() enter for path '{}'", __func__, path) LOG(DEBUG, "{}() enter for path '{}'", __func__, path) auto const targets = CTX->distributor()->locate_directory_metadata(path); auto const targets = CTX->distributor()->locate_directory_metadata(path); Loading Loading @@ -570,6 +605,11 @@ forward_get_dirents(const string& path) { pair<int, vector<tuple<const std::string, bool, size_t, time_t>>> pair<int, vector<tuple<const std::string, bool, size_t, time_t>>> forward_get_dirents_single(const string& path, int server) { forward_get_dirents_single(const string& path, int server) { if(CTX->use_proxy()) { LOG(WARNING, "{} is run due to missing proxy implementation!", __func__); } LOG(DEBUG, "{}() enter for path '{}'", __func__, path) LOG(DEBUG, "{}() enter for path '{}'", __func__, path) auto const targets = CTX->distributor()->locate_directory_metadata(path); auto const targets = CTX->distributor()->locate_directory_metadata(path); Loading