Loading lfs/src/fuse_ops/file.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ void adafs_ll_getattr(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi) if (ADAFS_DATA->host_size() > 1) { // might be remote auto recipient = RPC_DATA->get_rpc_node(fmt::FormatInt(ino).str()); if (recipient == ADAFS_DATA->host_id()) { // local if (recipient == ADAFS_DATA->host_id() || ino == ADAFS_ROOT_INODE) { // local, root inode is locally available err = get_attr(attr, ino); } else { // remote Loading Loading @@ -418,5 +418,6 @@ void adafs_ll_open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi) { void adafs_ll_release(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi) { ADAFS_DATA->spdlogger()->debug("adafs_ll_release() enter: inode {}", ino); // TODO to be implemented if required // TODO Update: Not required afaik fuse_reply_err(req, 0); } No newline at end of file lfs/src/main.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,8 @@ void init_rpc_env(promise<bool> rpc_promise) { return; } rpc_promise.set_value(true); margo_wait_for_finalize(mid); margo_wait_for_finalize( mid); // XXX this consumes 1 logical core. Should put a conditional variable here and wait until shutdown. } /** Loading lfs/src/rpc/client/c_metadata.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -113,9 +113,9 @@ int rpc_send_create_dentry(const size_t recipient, const fuse_ino_t parent, cons rpc_create_dentry_in_t in; rpc_create_dentry_out_t out; // fill in in.parent_inode = parent; in.parent_inode = static_cast<uint64_t>(parent); in.filename = name.c_str(); in.mode = mode; in.mode = static_cast<uint32_t>(mode); // TODO HG_ADDR_T is never freed atm. Need to change LRUCache if (!RPC_DATA->get_addr_by_hostid(recipient, svr_addr)) { ADAFS_DATA->spdlogger()->error("server address not resolvable for host id {}", recipient); Loading Loading @@ -146,7 +146,7 @@ int rpc_send_create_dentry(const size_t recipient, const fuse_ino_t parent, cons ADAFS_DATA->spdlogger()->error("RPC send_create_dentry (timed out)"); } in.filename = nullptr; // XXX temporary. If this is not done free input crashes because of invalid pointer?! HG_Free_input(handle, &in); HG_Destroy(handle); return 0; Loading Loading @@ -193,6 +193,7 @@ int rpc_send_create_mdata(const size_t recipient, const uid_t uid, const gid_t g ADAFS_DATA->spdlogger()->error("RPC send_create_mdata(timed out)"); } HG_Free_input(handle, &in); HG_Destroy(handle); return success == HG_TRUE ? 0 : 1; Loading Loading
lfs/src/fuse_ops/file.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ void adafs_ll_getattr(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi) if (ADAFS_DATA->host_size() > 1) { // might be remote auto recipient = RPC_DATA->get_rpc_node(fmt::FormatInt(ino).str()); if (recipient == ADAFS_DATA->host_id()) { // local if (recipient == ADAFS_DATA->host_id() || ino == ADAFS_ROOT_INODE) { // local, root inode is locally available err = get_attr(attr, ino); } else { // remote Loading Loading @@ -418,5 +418,6 @@ void adafs_ll_open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi) { void adafs_ll_release(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi) { ADAFS_DATA->spdlogger()->debug("adafs_ll_release() enter: inode {}", ino); // TODO to be implemented if required // TODO Update: Not required afaik fuse_reply_err(req, 0); } No newline at end of file
lfs/src/main.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,8 @@ void init_rpc_env(promise<bool> rpc_promise) { return; } rpc_promise.set_value(true); margo_wait_for_finalize(mid); margo_wait_for_finalize( mid); // XXX this consumes 1 logical core. Should put a conditional variable here and wait until shutdown. } /** Loading
lfs/src/rpc/client/c_metadata.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -113,9 +113,9 @@ int rpc_send_create_dentry(const size_t recipient, const fuse_ino_t parent, cons rpc_create_dentry_in_t in; rpc_create_dentry_out_t out; // fill in in.parent_inode = parent; in.parent_inode = static_cast<uint64_t>(parent); in.filename = name.c_str(); in.mode = mode; in.mode = static_cast<uint32_t>(mode); // TODO HG_ADDR_T is never freed atm. Need to change LRUCache if (!RPC_DATA->get_addr_by_hostid(recipient, svr_addr)) { ADAFS_DATA->spdlogger()->error("server address not resolvable for host id {}", recipient); Loading Loading @@ -146,7 +146,7 @@ int rpc_send_create_dentry(const size_t recipient, const fuse_ino_t parent, cons ADAFS_DATA->spdlogger()->error("RPC send_create_dentry (timed out)"); } in.filename = nullptr; // XXX temporary. If this is not done free input crashes because of invalid pointer?! HG_Free_input(handle, &in); HG_Destroy(handle); return 0; Loading Loading @@ -193,6 +193,7 @@ int rpc_send_create_mdata(const size_t recipient, const uid_t uid, const gid_t g ADAFS_DATA->spdlogger()->error("RPC send_create_mdata(timed out)"); } HG_Free_input(handle, &in); HG_Destroy(handle); return success == HG_TRUE ? 0 : 1; Loading