diff options
-rw-r--r-- | xlators/protocol/client/src/client-handshake.c | 45 | ||||
-rw-r--r-- | xlators/protocol/client/src/client.c | 13 | ||||
-rw-r--r-- | xlators/protocol/client/src/client3_1-fops.c | 62 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 17 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-helpers.c | 17 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-resolve.c | 31 | ||||
-rw-r--r-- | xlators/protocol/server/src/server.c | 2 | ||||
-rw-r--r-- | xlators/protocol/server/src/server3_1-fops.c | 58 |
8 files changed, 100 insertions, 145 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index 1cd25424f..9a806f7e9 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -126,13 +126,11 @@ client_start_ping (void *data) struct timeval timeout = {0, }; call_frame_t *frame = NULL; int frame_count = 0; - rpc_transport_t *trans = NULL; this = data; conf = this->private; conn = &conf->rpc->conn; - trans = conn->trans; if (conf->opt.ping_timeout == 0) return; @@ -256,15 +254,14 @@ out: int -client3_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count, void *myframe) +client3_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count, + void *myframe) { gf_getspec_rsp rsp = {0,}; call_frame_t *frame = NULL; - clnt_conf_t *conf = NULL; int ret = 0; frame = myframe; - conf = frame->this->private; if (-1 == req->rpc_status) { rsp.op_ret = -1; @@ -385,12 +382,10 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m char *process_uuid = NULL; char *remote_error = NULL; char *remote_subvol = NULL; - rpc_transport_t *peer_trans = NULL; gf_setvolume_rsp rsp = {0,}; - uint64_t peertrans_int = 0; int ret = 0; - int op_ret = 0; - int op_errno = 0; + int32_t op_ret = 0; + int32_t op_errno = 0; frame = myframe; this = frame->this; @@ -398,14 +393,12 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m if (-1 == req->rpc_status) { op_ret = -1; - op_errno = EINVAL; goto out; } ret = xdr_to_setvolume_rsp (*iov, &rsp); if (ret < 0) { gf_log ("", GF_LOG_ERROR, "error"); - op_errno = EINVAL; op_ret = -1; goto out; } @@ -460,25 +453,30 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m } ret = dict_get_str (this->options, "remote-subvolume", &remote_subvol); - if (!remote_subvol) + if (ret || !remote_subvol) goto out; - if (process_uuid && + /* TODO: currently setpeer path is broken */ + /* + if (process_uuid && req->conn && !strcmp (this->ctx->process_uuid, process_uuid)) { + rpc_transport_t *peer_trans = NULL; + uint64_t peertrans_int = 0; + ret = dict_get_uint64 (reply, "transport-ptr", &peertrans_int); - - peer_trans = (void *) (long) (peertrans_int); + if (ret) + goto out; gf_log (this->name, GF_LOG_WARNING, "attaching to the local volume '%s'", remote_subvol); - if (req->conn) { - /* TODO: Some issues with this logic at present */ - //rpc_transport_setpeer (req->conn->trans, peer_trans); - } + peer_trans = (void *) (long) (peertrans_int); + + rpc_transport_setpeer (req->conn->trans, peer_trans); } + */ gf_log (this->name, GF_LOG_NORMAL, "Connected to %s, attached to remote volume '%s'.", @@ -572,11 +570,18 @@ client_setvolume (xlator_t *this, struct rpc_clnt *rpc) } if (this->ctx->cmd_args.volfile_server) { - if (this->ctx->cmd_args.volfile_id) + if (this->ctx->cmd_args.volfile_id) { ret = dict_set_str (options, "volfile-key", this->ctx->cmd_args.volfile_id); + if (ret) + gf_log (this->name, GF_LOG_ERROR, + "failed to set 'volfile-key'"); + } ret = dict_set_uint32 (options, "volfile-checksum", this->graph->volfile_checksum); + if (ret) + gf_log (this->name, GF_LOG_ERROR, + "failed to set 'volfile-checksum'"); } req.dict.dict_len = dict_serialized_length (options); diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 97d964434..383f52bc9 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -154,6 +154,9 @@ client_releasedir (xlator_t *this, fd_t *fd) ret = proc->fn (frame, this, &args); } out: + if (ret) + gf_log (this->name, GF_LOG_TRACE, + "releasedir fop failed"); return 0; } @@ -180,6 +183,9 @@ client_release (xlator_t *this, fd_t *fd) ret = proc->fn (frame, this, &args); } out: + if (ret) + gf_log (this->name, GF_LOG_TRACE, + "release fop failed"); return 0; } @@ -1394,10 +1400,15 @@ client_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event, if ((ret < 0) || (strcasecmp (handshake, "on"))) { ret = client_handshake (this, conf->rpc); - + if (ret) + gf_log (this->name, GF_LOG_DEBUG, + "handshake msg returned %d", ret); } else { //conf->rpc->connected = 1; ret = default_notify (this, GF_EVENT_CHILD_UP, NULL); + if (ret) + gf_log (this->name, GF_LOG_DEBUG, + "default notify failed"); } break; } diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index a007803b7..136f84bf5 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -1194,7 +1194,8 @@ client3_1_xattrop_cbk (struct rpc_req *req, struct iovec *iov, int count, goto out; } - op_ret = rsp.op_ret; + op_errno = rsp.op_errno; + op_ret = rsp.op_ret; if (-1 != op_ret) { op_ret = -1; dict_len = rsp.dict.dict_len; @@ -1221,7 +1222,7 @@ client3_1_xattrop_cbk (struct rpc_req *req, struct iovec *iov, int count, out: STACK_UNWIND_STRICT (xattrop, frame, op_ret, - gf_error_to_errno (rsp.op_errno), dict); + gf_error_to_errno (op_errno), dict); if (rsp.dict.dict_val) { /* don't use GF_FREE, this memory was allocated by libc @@ -1267,8 +1268,8 @@ client3_1_fxattrop_cbk (struct rpc_req *req, struct iovec *iov, int count, gf_log ("", GF_LOG_ERROR, "error"); goto out; } - - op_ret = rsp.op_ret; + op_errno = rsp.op_errno; + op_ret = rsp.op_ret; if (-1 != op_ret) { op_ret = -1; dict_len = rsp.dict.dict_len; @@ -1295,7 +1296,7 @@ client3_1_fxattrop_cbk (struct rpc_req *req, struct iovec *iov, int count, out: STACK_UNWIND_STRICT (fxattrop, frame, op_ret, - gf_error_to_errno (rsp.op_errno), dict); + gf_error_to_errno (op_errno), dict); if (rsp.dict.dict_val) { /* don't use GF_FREE, this memory was allocated by libc @@ -1895,33 +1896,32 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count, gf_stat_to_iatt (&rsp.stat, &stbuf); ret = inode_ctx_get2 (inode, frame->this, &oldino, &oldgen); - if (oldino != stbuf.ia_ino || oldgen != stbuf.ia_gen) { - if (oldino) { - gf_log (frame->this->name, GF_LOG_DEBUG, - "LOOKUP %"PRId64"/%s (%s): " - "inode number changed from " - "{%"PRId64",%"PRId64"} to {%"PRId64",%"PRId64"}", - local->loc.parent ? - local->loc.parent->ino : (uint64_t) 0, - local->loc.name, - local->loc.path, - oldgen, oldino, stbuf.ia_gen, stbuf.ia_ino); - op_errno = ESTALE; - goto out; - } + if ((!ret) && ((oldino != stbuf.ia_ino) || + (oldgen != stbuf.ia_gen))) { + gf_log (frame->this->name, GF_LOG_DEBUG, + "LOOKUP %"PRId64"/%s (%s): " + "inode number changed from " + "{%"PRId64",%"PRId64"} to {%"PRId64",%"PRId64"}", + local->loc.parent ? + local->loc.parent->ino : (uint64_t) 0, + local->loc.name, + local->loc.path, + oldgen, oldino, stbuf.ia_gen, stbuf.ia_ino); + op_errno = ESTALE; + goto out; + } - ret = inode_ctx_put2 (inode, frame->this, - stbuf.ia_ino, stbuf.ia_gen); - if (ret < 0) { - gf_log (frame->this->name, GF_LOG_DEBUG, - "LOOKUP %"PRId64"/%s (%s) : " - "failed to set remote inode " - "number to inode ctx", - local->loc.parent ? - local->loc.parent->ino : (uint64_t) 0, - local->loc.name, - local->loc.path); - } + ret = inode_ctx_put2 (inode, frame->this, + stbuf.ia_ino, stbuf.ia_gen); + if (ret < 0) { + gf_log (frame->this->name, GF_LOG_DEBUG, + "LOOKUP %"PRId64"/%s (%s) : " + "failed to set remote inode " + "number to inode ctx", + local->loc.parent ? + local->loc.parent->ino : (uint64_t) 0, + local->loc.name, + local->loc.path); } if (rsp.dict.dict_len > 0) { diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index f9a4bca36..689648838 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -266,6 +266,7 @@ server_getspec (rpcsvc_request_t *req) if (xdr_to_glusterfs_req (req, &args, xdr_to_getspec_req)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; + op_errno = EINVAL; goto fail; } @@ -278,6 +279,7 @@ server_getspec (rpcsvc_request_t *req) gf_log (conn->this->name, GF_LOG_ERROR, "Unable to stat %s (%s)", filename, strerror (errno)); + op_errno = errno; goto fail; } @@ -286,6 +288,7 @@ server_getspec (rpcsvc_request_t *req) gf_log (conn->this->name, GF_LOG_ERROR, "Unable to open %s (%s)", filename, strerror (errno)); + op_errno = errno; goto fail; } ret = file_len = stbuf.st_size; @@ -295,7 +298,7 @@ server_getspec (rpcsvc_request_t *req) _volfile_update_checksum (conn->this, key, checksum); } } else { - errno = ENOENT; + op_errno = ENOENT; } if (file_len) { @@ -312,8 +315,8 @@ server_getspec (rpcsvc_request_t *req) } /* convert to XDR */ -fail: op_errno = errno; +fail: rsp.op_errno = gf_errno_to_error (op_errno); rsp.op_ret = ret; @@ -471,6 +474,9 @@ server_setvolume (rpcsvc_request_t *req) if (ret == 0) { ret = dict_get_str (params, "volfile-key", &volfile_key); + if (ret) + gf_log (this->name, GF_LOG_DEBUG, + "failed to set 'volfile-key'"); ret = _validate_volfile_checksum (this, volfile_key, checksum); @@ -561,10 +567,15 @@ server_setvolume (rpcsvc_request_t *req) ret = dict_set_str (reply, "process-uuid", this->ctx->process_uuid); + if (ret) + gf_log (this->name, GF_LOG_DEBUG, + "failed to set 'process-uuid'"); ret = dict_set_uint64 (reply, "transport-ptr", ((uint64_t) (long) req->conn->trans)); - + if (ret) + gf_log (this->name, GF_LOG_DEBUG, + "failed to set 'transport-ptr'"); fail: rsp.dict.dict_len = dict_serialized_length (reply); diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 84c66d114..126185321 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -942,15 +942,14 @@ destroy_server_conn_state (server_connection_t *conn) void print_caller (char *str, int size, call_frame_t *frame) { - int filled = 0; server_state_t *state = NULL; state = CALL_STATE (frame); - filled += snprintf (str + filled, size - filled, - " Callid=%"PRId64", Client=%s", - frame->root->unique, - state->xprt->peerinfo.identifier); + snprintf (str, size, + " Callid=%"PRId64", Client=%s", + frame->root->unique, + state->xprt->peerinfo.identifier); return; } @@ -987,7 +986,7 @@ server_print_resolve (char *str, int size, server_resolve_t *resolve) filled += snprintf (str + filled, size - filled, "path=%s", resolve->path); - filled += snprintf (str + filled, size - filled, "}"); + snprintf (str + filled, size - filled, "}"); } @@ -1014,7 +1013,7 @@ server_print_loc (char *str, int size, loc_t *loc) filled += snprintf (str + filled, size - filled, "parent=%p", loc->parent); - filled += snprintf (str + filled, size - filled, "}"); + snprintf (str + filled, size - filled, "}"); } @@ -1060,8 +1059,8 @@ server_print_params (char *str, int size, server_state_t *state) filled += snprintf (str + filled, size - filled, "volume=%s,", state->volume); - filled += snprintf (str + filled, size - filled, - "bound_xl=%s}", state->conn->bound_xl->name); + snprintf (str + filled, size - filled, + "bound_xl=%s}", state->conn->bound_xl->name); } int diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c index 91cf0d96f..ec955b1e8 100644 --- a/xlators/protocol/server/src/server-resolve.c +++ b/xlators/protocol/server/src/server-resolve.c @@ -41,8 +41,6 @@ component_count (const char *path) int count = 0; const char *trav = NULL; - trav = path; - for (trav = path; *trav; trav++) { if (*trav == '/') count++; @@ -56,7 +54,6 @@ int prepare_components (call_frame_t *frame) { server_state_t *state = NULL; - xlator_t *this = NULL; server_resolve_t *resolve = NULL; char *resolved = NULL; int count = 0; @@ -66,7 +63,6 @@ prepare_components (call_frame_t *frame) state = CALL_STATE (frame); - this = frame->this; resolve = state->resolve_now; resolved = gf_strdup (resolve->path); @@ -117,6 +113,9 @@ resolve_loc_touchup (call_frame_t *frame) } else if (loc->inode) { ret = inode_path (loc->inode, NULL, &path); } + if (ret) + gf_log ("", GF_LOG_DEBUG, + "return value inode_path %d", ret); if (!path) path = gf_strdup (resolve->path); @@ -157,6 +156,9 @@ resolve_deep_continue (call_frame_t *frame) ret = resolve_inode_simple (frame); else if (resolve->path) ret = resolve_path_simple (frame); + if (ret) + gf_log (this->name, GF_LOG_DEBUG, + "return value of resolve_*_simple %d", ret); resolve_loc_touchup (frame); @@ -228,12 +230,10 @@ int resolve_path_deep (call_frame_t *frame) { server_state_t *state = NULL; - xlator_t *this = NULL; server_resolve_t *resolve = NULL; int i = 0; state = CALL_STATE (frame); - this = frame->this; resolve = state->resolve_now; gf_log (BOUND_XL (frame)->name, GF_LOG_TRACE, @@ -258,7 +258,6 @@ int resolve_path_simple (call_frame_t *frame) { server_state_t *state = NULL; - xlator_t *this = NULL; server_resolve_t *resolve = NULL; struct resolve_comp *components = NULL; int ret = -1; @@ -267,7 +266,6 @@ resolve_path_simple (call_frame_t *frame) int i = 0; state = CALL_STATE (frame); - this = frame->this; resolve = state->resolve_now; components = resolve->components; @@ -412,14 +410,10 @@ int server_resolve_entry (call_frame_t *frame) { server_state_t *state = NULL; - xlator_t *this = NULL; - server_resolve_t *resolve = NULL; int ret = 0; loc_t *loc = NULL; state = CALL_STATE (frame); - this = frame->this; - resolve = state->resolve_now; loc = state->loc_now; ret = resolve_entry_simple (frame); @@ -443,13 +437,11 @@ int resolve_inode_simple (call_frame_t *frame) { server_state_t *state = NULL; - xlator_t *this = NULL; server_resolve_t *resolve = NULL; inode_t *inode = NULL; int ret = 0; state = CALL_STATE (frame); - this = frame->this; resolve = state->resolve_now; if (resolve->type == RESOLVE_EXACT) { @@ -488,14 +480,10 @@ int server_resolve_inode (call_frame_t *frame) { server_state_t *state = NULL; - xlator_t *this = NULL; - server_resolve_t *resolve = NULL; int ret = 0; loc_t *loc = NULL; state = CALL_STATE (frame); - this = frame->this; - resolve = state->resolve_now; loc = state->loc_now; ret = resolve_inode_simple (frame); @@ -519,13 +507,11 @@ int server_resolve_fd (call_frame_t *frame) { server_state_t *state = NULL; - xlator_t *this = NULL; server_resolve_t *resolve = NULL; server_connection_t *conn = NULL; uint64_t fd_no = -1; state = CALL_STATE (frame); - this = frame->this; resolve = state->resolve_now; conn = SERVER_CONNECTION (frame); @@ -548,11 +534,9 @@ int server_resolve (call_frame_t *frame) { server_state_t *state = NULL; - xlator_t *this = NULL; server_resolve_t *resolve = NULL; state = CALL_STATE (frame); - this = frame->this; resolve = state->resolve_now; if (resolve->fd_no != -1) { @@ -644,13 +628,10 @@ int resolve_and_resume (call_frame_t *frame, server_resume_fn_t fn) { server_state_t *state = NULL; - xlator_t *this = NULL; state = CALL_STATE (frame); state->resume_fn = fn; - this = frame->this; - server_resolve_all (frame); return 0; diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 874c2615e..0dce85b02 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -332,6 +332,8 @@ validate_auth_options (xlator_t *this, dict_t *dict) if (ret == 0) { /* for module type */ tmp = strtok_r (NULL, ".", &saveptr); + if (!tmp) + break; /* for volume name */ tmp = strtok_r (NULL, ".", &saveptr); } diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index d100f5fde..18ace876c 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -1742,7 +1742,7 @@ server_rchecksum_resume (call_frame_t *frame, xlator_t *bound_xl) { server_state_t *state = NULL; int op_ret = 0; - int op_errno = 0; + int op_errno = EINVAL; state = CALL_STATE (frame); @@ -1758,7 +1758,7 @@ server_rchecksum_resume (call_frame_t *frame, xlator_t *bound_xl) return 0; err: - server_rchecksum_cbk (frame, NULL, frame->this, -1, EINVAL, 0, NULL); + server_rchecksum_cbk (frame, NULL, frame->this, op_ret, op_errno, 0, NULL); return 0; @@ -2842,7 +2842,6 @@ int server_create (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_create_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -2851,8 +2850,6 @@ server_create (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.path = path; args.bname = bname; @@ -3675,7 +3672,6 @@ int server_getxattr (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_getxattr_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -3684,8 +3680,6 @@ server_getxattr (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.path = path; args.name = name; @@ -3728,7 +3722,6 @@ int server_fgetxattr (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_fgetxattr_req args = {0,}; char name[4096] = {0,}; @@ -3736,8 +3729,6 @@ server_fgetxattr (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.name = name; if (!xdr_to_fgetxattr_req (req->msg[0], &args)) { //failed to decode msg; @@ -3777,7 +3768,6 @@ int server_removexattr (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_removexattr_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -3786,8 +3776,6 @@ server_removexattr (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.path = path; args.name = name; if (!xdr_to_removexattr_req (req->msg[0], &args)) { @@ -3874,15 +3862,12 @@ int server_readdirp (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_readdirp_req args = {0,}; if (!req) return 0; - conn = req->conn->trans->xl_private; - if (!xdr_to_readdirp_req (req->msg[0], &args)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; @@ -3918,15 +3903,12 @@ int server_readdir (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_readdir_req args = {0,}; if (!req) return 0; - conn = req->conn->trans->xl_private; - if (!xdr_to_readdir_req (req->msg[0], &args)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; @@ -3962,15 +3944,12 @@ int server_fsyncdir (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_fsyncdir_req args = {0,}; if (!req) return 0; - conn = req->conn->trans->xl_private; - if (!xdr_to_fsyncdir_req (req->msg[0], &args)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; @@ -4007,7 +3986,6 @@ int server_mknod (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_mknod_req args = {0,}; char bname[SERVER_PATH_MAX] = {0,}; @@ -4016,7 +3994,6 @@ server_mknod (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; args.bname = bname; @@ -4060,7 +4037,6 @@ int server_mkdir (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_mkdir_req args = {0,}; char bname[SERVER_PATH_MAX] = {0,}; @@ -4069,7 +4045,6 @@ server_mkdir (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; args.bname = bname; @@ -4112,7 +4087,6 @@ int server_rmdir (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_rmdir_req args = {0,}; char bname[SERVER_PATH_MAX] = {0,}; @@ -4121,7 +4095,6 @@ server_rmdir (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; args.bname = bname; @@ -4163,7 +4136,6 @@ int server_inodelk (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_inodelk_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -4173,7 +4145,6 @@ server_inodelk (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; args.volume = volume; @@ -4242,7 +4213,6 @@ int server_finodelk (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_finodelk_req args = {0,}; char volume[4096] = {0,}; @@ -4250,8 +4220,6 @@ server_finodelk (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.volume = volume; if (!xdr_to_finodelk_req (req->msg[0], &args)) { //failed to decode msg; @@ -4317,7 +4285,6 @@ int server_entrylk (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_entrylk_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -4331,8 +4298,6 @@ server_entrylk (rpcsvc_request_t *req) args.volume = volume; args.name = name; - conn = req->conn->trans->xl_private; - if (!xdr_to_entrylk_req (req->msg[0], &args)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; @@ -4375,7 +4340,6 @@ int server_fentrylk (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_fentrylk_req args = {0,}; char name[4096] = {0,}; @@ -4384,8 +4348,6 @@ server_fentrylk (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.name = name; args.volume = volume; if (!xdr_to_fentrylk_req (req->msg[0], &args)) { @@ -4427,7 +4389,6 @@ int server_access (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_access_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -4435,8 +4396,6 @@ server_access (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.path = path; if (!xdr_to_access_req (req->msg[0], &args)) { //failed to decode msg; @@ -4476,7 +4435,6 @@ int server_symlink (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_symlink_req args = {0,}; char linkname[4096] = {0,}; @@ -4486,7 +4444,6 @@ server_symlink (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; args.bname = bname; args.linkname = linkname; @@ -4530,7 +4487,6 @@ int server_link (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_link_req args = {0,}; char oldpath[SERVER_PATH_MAX] = {0,}; @@ -4540,8 +4496,6 @@ server_link (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.oldpath = oldpath; args.newpath = newpath; args.newbname = newbname; @@ -4588,7 +4542,6 @@ int server_rename (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_rename_req args = {0,}; char oldpath[SERVER_PATH_MAX] = {0,}; @@ -4599,8 +4552,6 @@ server_rename (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.oldpath = oldpath; args.oldbname = oldbname; args.newpath = newpath; @@ -4723,15 +4674,12 @@ int server_rchecksum (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_rchecksum_req args = {0,}; if (!req) return 0; - conn = req->conn->trans->xl_private; - if (!xdr_to_rchecksum_req (req->msg[0], &args)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; @@ -4888,7 +4836,6 @@ int server_statfs (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_statfs_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -4896,7 +4843,6 @@ server_statfs (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; if (!xdr_to_statfs_req (req->msg[0], &args)) { //failed to decode msg; |