diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 2 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 12 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-helpers.c | 13 | ||||
-rw-r--r-- | xlators/protocol/server/src/server.c | 6 | ||||
-rw-r--r-- | xlators/protocol/server/src/server3_1-fops.c | 16 |
5 files changed, 24 insertions, 25 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 445e5a4758a..beb4185835b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -352,7 +352,7 @@ glusterd_serialize_reply (rpcsvc_request_t *req, void *arg, /* First, get the io buffer into which the reply in arg will * be serialized. */ - iob = iobuf_get (req->conn->svc->ctx->iobuf_pool); + iob = iobuf_get (req->svc->ctx->iobuf_pool); if (!iob) { gf_log ("", GF_LOG_ERROR, "Failed to get iobuf"); goto ret; diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index 68964883836..357160c7338 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -260,7 +260,7 @@ server_getspec (rpcsvc_request_t *req) gf_getspec_rsp rsp = {0,}; server_connection_t *conn = NULL; - conn = req->conn->trans->private; + conn = req->trans->private; conf = conn->this->private; if (xdr_to_glusterfs_req (req, &args, xdr_to_getspec_req)) { @@ -359,7 +359,7 @@ server_setvolume (rpcsvc_request_t *req) goto fail; } - this = req->conn->svc->mydata; + this = req->svc->mydata; config_params = dict_copy_with_ref (this->options, NULL); conf = this->private; @@ -395,8 +395,8 @@ server_setvolume (rpcsvc_request_t *req) conn = server_connection_get (this, process_uuid); - if (req->conn->trans->xl_private != conn) - req->conn->trans->xl_private = conn; + if (req->trans->xl_private != conn) + req->trans->xl_private = conn; ret = dict_get_int32 (params, "fops-version", &fop_version); if (ret < 0) { @@ -497,7 +497,7 @@ server_setvolume (rpcsvc_request_t *req) } - peerinfo = &req->conn->trans->peerinfo; + peerinfo = &req->trans->peerinfo; if (peerinfo) { ret = dict_set_static_ptr (params, "peer-info", peerinfo); if (ret < 0) @@ -572,7 +572,7 @@ server_setvolume (rpcsvc_request_t *req) "failed to set 'process-uuid'"); ret = dict_set_uint64 (reply, "transport-ptr", - ((uint64_t) (long) req->conn->trans)); + ((uint64_t) (long) req->trans)); if (ret) gf_log (this->name, GF_LOG_DEBUG, "failed to set 'transport-ptr'"); diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 126185321c8..380e47216bd 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -745,16 +745,15 @@ server_alloc_frame (rpcsvc_request_t *req) server_connection_t *conn = NULL; GF_VALIDATE_OR_GOTO("server", req, out); - GF_VALIDATE_OR_GOTO("server", req->conn, out); - GF_VALIDATE_OR_GOTO("server", req->conn->trans, out); - GF_VALIDATE_OR_GOTO("server", req->conn->svc, out); - GF_VALIDATE_OR_GOTO("server", req->conn->svc->ctx, out); + GF_VALIDATE_OR_GOTO("server", req->trans, out); + GF_VALIDATE_OR_GOTO("server", req->svc, out); + GF_VALIDATE_OR_GOTO("server", req->svc->ctx, out); - conn = (server_connection_t *)req->conn->trans->xl_private; + conn = (server_connection_t *)req->trans->xl_private; if (!conn) goto out; - frame = create_frame (conn->this, req->conn->svc->ctx->pool); + frame = create_frame (conn->this, req->svc->ctx->pool); GF_VALIDATE_OR_GOTO("server", frame, out); state = GF_CALLOC (1, sizeof (*state), gf_server_mt_state_t); @@ -763,7 +762,7 @@ server_alloc_frame (rpcsvc_request_t *req) if (conn->bound_xl) state->itable = conn->bound_xl->itable; - state->xprt = req->conn->trans; + state->xprt = req->trans; state->conn = conn; state->resolve.fd_no = -1; diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 0dce85b020e..96bb72901a7 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -45,7 +45,7 @@ gfs_serialize_reply (rpcsvc_request_t *req, void *arg, gfs_serialize_t sfunc, /* First, get the io buffer into which the reply in arg will * be serialized. */ - iob = iobuf_get (req->conn->svc->ctx->iobuf_pool); + iob = iobuf_get (req->svc->ctx->iobuf_pool); if (!iob) { gf_log ("", GF_LOG_ERROR, "Failed to get iobuf"); goto ret; @@ -367,6 +367,7 @@ server_rpc_notify (rpcsvc_t *rpc, void *xl, rpcsvc_event_t event, rpc_transport_t *xprt = NULL; server_connection_t *conn = NULL; + if (!xl || !data) { gf_log ("server", GF_LOG_WARNING, "Calling rpc_notify without initializing"); @@ -387,13 +388,12 @@ server_rpc_notify (rpcsvc_t *rpc, void *xl, rpcsvc_event_t event, xprt->protocol_private = conn; */ - xprt->mydata = this; break; } case RPCSVC_EVENT_DISCONNECT: conn = get_server_conn_state (this, xprt); if (conn) - destroy_server_conn_state (conn); + server_connection_put (this, conn); break; default: diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index 5175251601e..d077bd24f24 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -3054,7 +3054,7 @@ server_release (rpcsvc_request_t *req) goto out; } - conn = req->conn->trans->xl_private; + conn = req->trans->xl_private; gf_fd_put (conn->fdtable, args.fd); server_submit_reply (NULL, req, &rsp, NULL, 0, NULL, @@ -3076,7 +3076,7 @@ server_releasedir (rpcsvc_request_t *req) goto out; } - conn = req->conn->trans->xl_private; + conn = req->trans->xl_private; gf_fd_put (conn->fdtable, args.fd); server_submit_reply (NULL, req, &rsp, NULL, 0, NULL, @@ -3360,7 +3360,7 @@ server_setxattr (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; + conn = req->trans->xl_private; args.path = path; args.dict.dict_val = dict_val; @@ -3445,7 +3445,7 @@ server_fsetxattr (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; + conn = req->trans->xl_private; args.dict.dict_val = dict_val; if (!xdr_to_fsetxattr_req (req->msg[0], &args)) { @@ -3523,7 +3523,7 @@ server_fxattrop (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; + conn = req->trans->xl_private; args.dict.dict_val = dict_val; if (!xdr_to_fxattrop_req (req->msg[0], &args)) { @@ -3606,7 +3606,7 @@ server_xattrop (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; + conn = req->trans->xl_private; args.dict.dict_val = dict_val; args.path = path; @@ -4608,7 +4608,7 @@ server_lk (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; + conn = req->trans->xl_private; if (!xdr_to_lk_req (req->msg[0], &args)) { //failed to decode msg; @@ -4746,7 +4746,7 @@ server_lookup (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; + conn = req->trans->xl_private; args.path = path; args.bname = bname; |