From cd5c9df4b67073089a5502d5e4c2e2e7d2141e4a Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Fri, 8 Oct 2010 07:06:57 +0000 Subject: mgmt/glusterd: Fix replace brick to pass src-brick and dst-brick port nos properly. Fix also contains patch from shishir ng for maintaining replace-brick states in glusterd. Signed-off-by: Pavan Vilas Sondur Signed-off-by: Vijay Bellur BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235 --- xlators/mgmt/glusterd/src/glusterd-handler.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 7e5cddac88d..70734074fa7 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -1890,11 +1890,12 @@ out: int glusterd_op_stage_send_resp (rpcsvc_request_t *req, - int32_t op, int32_t status, char *op_errstr) + int32_t op, int32_t status, + char *op_errstr, dict_t *rsp_dict) { - gd1_mgmt_stage_op_rsp rsp = {{0},}; - int ret = -1; + gd1_mgmt_stage_op_rsp rsp = {{0},}; + int ret = -1; GF_ASSERT (req); rsp.op_ret = status; @@ -1905,6 +1906,15 @@ glusterd_op_stage_send_resp (rpcsvc_request_t *req, else rsp.op_errstr = ""; + ret = dict_allocate_and_serialize (rsp_dict, + &rsp.dict.dict_val, + (size_t *)&rsp.dict.dict_len); + if (ret < 0) { + gf_log ("", GF_LOG_DEBUG, + "failed to get serialized length of dict"); + return ret; + } + ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL, gd_xdr_serialize_mgmt_stage_op_rsp); -- cgit