summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-07-29 16:36:27 +0530
committerAnand Avati <avati@gluster.com>2011-07-31 23:15:32 -0700
commitdf0a72d9c118c2a1146f2787eee6d5f0a58853f0 (patch)
treefc6eb998d3e3965610aef473a1f6b3e46cf2fb7c /xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
parent76acac485b9f06f36d145b4c31fa6f4da3c70f52 (diff)
Variable IOBUF: Use variable iobuf for cli/glusterd/glusterfsd(mgmt)
By using variable iobufs, xfer data size is no more limited to 128K (default). This helps in scaling. Change-Id: Iab453db9223d887306d150cd6fe0b1eae9c422cc BUG: 2472 Reviewed-on: http://review.gluster.com/13 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rpc-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c47
1 files changed, 37 insertions, 10 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index b7d800ffc..29239b324 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -57,6 +57,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
dict_t *ctx = NULL;
char *free_ptr = NULL;
glusterd_conf_t *conf = NULL;
+ xdrproc_t xdrproc;
GF_ASSERT (THIS);
@@ -77,6 +78,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.op_errstr = "";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_create_vol_rsp;
+ xdrproc = (xdrproc_t)xdr_gf1_cli_create_vol_rsp;
break;
}
@@ -92,6 +94,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.op_errstr = "";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_start_vol_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_start_vol_rsp;
break;
}
@@ -107,6 +110,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.op_errstr = "";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_stop_vol_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_stop_vol_rsp;
break;
}
@@ -122,6 +126,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.op_errstr = "";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_delete_vol_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_delete_vol_rsp;
break;
}
@@ -133,6 +138,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
//rsp.volname = "";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_defrag_vol_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_defrag_vol_rsp;
break;
}
@@ -148,6 +154,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.op_errstr = "";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_add_brick_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_add_brick_rsp;
break;
}
@@ -163,6 +170,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.volname = "";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_remove_brick_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_remove_brick_rsp;
break;
}
@@ -182,6 +190,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.volname = "";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_replace_brick_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_replace_brick_rsp;
break;
}
@@ -207,6 +216,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_set_vol_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_set_vol_rsp;
break;
}
@@ -223,6 +233,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.op_errstr = "Error while resetting options";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_reset_vol_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_reset_vol_rsp;
break;
}
@@ -237,6 +248,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.errstr = "";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_log_filename_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_log_filename_rsp;
break;
}
case GD_OP_LOG_ROTATE:
@@ -250,6 +262,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.errstr = "";
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_log_rotate_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_log_rotate_rsp;
break;
}
case GD_OP_SYNC_VOLUME:
@@ -263,6 +276,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.op_errstr = "";
cli_rsp = &rsp;
sfunc = gf_xdr_from_cli_sync_volume_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_sync_volume_rsp;
break;
}
case GD_OP_GSYNC_SET:
@@ -297,6 +311,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
rsp.op_errstr = op_errstr;
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_gsync_set_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_gsync_set_rsp;
break;
}
case GD_OP_RENAME_VOLUME:
@@ -323,6 +338,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
free_ptr = rsp.stats_info.stats_info_val;
cli_rsp = &rsp;
sfunc = gf_xdr_from_cli_stats_volume_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_stats_volume_rsp;
break;
}
@@ -371,6 +387,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
}
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_quota_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_quota_rsp;
break;
}
@@ -386,6 +403,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
cli_rsp = &rsp;
sfunc = gf_xdr_serialize_cli_log_level_rsp;
+ xdrproc = (xdrproc_t) xdr_gf1_cli_log_level_rsp;
break;
}
@@ -398,7 +416,7 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
}
ret = glusterd_submit_reply (req, cli_rsp, NULL, 0, NULL,
- sfunc);
+ sfunc, xdrproc);
if (free_ptr)
GF_FREE (free_ptr);
@@ -1374,7 +1392,8 @@ glusterd3_1_probe (call_frame_t *frame, xlator_t *this,
ret = glusterd_submit_request (peerinfo->rpc, &req, frame, peerinfo->mgmt,
GD_MGMT_PROBE_QUERY,
NULL, gd_xdr_from_mgmt_probe_req,
- this, glusterd3_1_probe_cbk);
+ this, glusterd3_1_probe_cbk,
+ (xdrproc_t)xdr_gd1_mgmt_probe_req);
out:
if (req.hostname)
@@ -1427,7 +1446,8 @@ glusterd3_1_friend_add (call_frame_t *frame, xlator_t *this,
ret = glusterd_submit_request (peerinfo->rpc, &req, frame, peerinfo->mgmt,
GD_MGMT_FRIEND_ADD,
NULL, gd_xdr_from_mgmt_friend_req,
- this, glusterd3_1_friend_add_cbk);
+ this, glusterd3_1_friend_add_cbk,
+ (xdrproc_t)xdr_gd1_mgmt_friend_req);
out:
@@ -1469,7 +1489,8 @@ glusterd3_1_friend_remove (call_frame_t *frame, xlator_t *this,
ret = glusterd_submit_request (peerinfo->rpc, &req, frame, peerinfo->mgmt,
GD_MGMT_FRIEND_REMOVE,
NULL, gd_xdr_from_mgmt_friend_req,
- this, glusterd3_1_friend_remove_cbk);
+ this, glusterd3_1_friend_remove_cbk,
+ (xdrproc_t)xdr_gd1_mgmt_friend_req);
out:
gf_log ("glusterd", GF_LOG_DEBUG, "Returning %d", ret);
@@ -1515,7 +1536,8 @@ glusterd3_1_friend_update (call_frame_t *frame, xlator_t *this,
peerinfo->mgmt,
GD_MGMT_FRIEND_UPDATE,
NULL, gd_xdr_from_mgmt_friend_update,
- this, glusterd3_1_friend_update_cbk);
+ this, glusterd3_1_friend_update_cbk,
+ (xdrproc_t)xdr_gd1_mgmt_friend_update);
out:
if (req.friends.friends_val)
@@ -1553,7 +1575,8 @@ glusterd3_1_cluster_lock (call_frame_t *frame, xlator_t *this,
peerinfo->mgmt, GD_MGMT_CLUSTER_LOCK,
NULL,
gd_xdr_from_mgmt_cluster_lock_req,
- this, glusterd3_1_cluster_lock_cbk);
+ this, glusterd3_1_cluster_lock_cbk,
+ (xdrproc_t)xdr_gd1_mgmt_cluster_lock_req);
out:
gf_log ("glusterd", GF_LOG_DEBUG, "Returning %d", ret);
return ret;
@@ -1587,7 +1610,8 @@ glusterd3_1_cluster_unlock (call_frame_t *frame, xlator_t *this,
peerinfo->mgmt, GD_MGMT_CLUSTER_UNLOCK,
NULL,
gd_xdr_from_mgmt_cluster_unlock_req,
- this, glusterd3_1_cluster_unlock_cbk);
+ this, glusterd3_1_cluster_unlock_cbk,
+ (xdrproc_t)xdr_gd1_mgmt_cluster_unlock_req);
out:
gf_log ("glusterd", GF_LOG_DEBUG, "Returning %d", ret);
return ret;
@@ -1646,7 +1670,8 @@ glusterd3_1_stage_op (call_frame_t *frame, xlator_t *this,
peerinfo->mgmt, GD_MGMT_STAGE_OP,
NULL,
gd_xdr_from_mgmt_stage_op_req,
- this, glusterd3_1_stage_op_cbk);
+ this, glusterd3_1_stage_op_cbk,
+ (xdrproc_t)xdr_gd1_mgmt_stage_op_req);
out:
if ((_gf_true == is_alloc) && req.buf.buf_val)
@@ -1708,7 +1733,8 @@ glusterd3_1_commit_op (call_frame_t *frame, xlator_t *this,
peerinfo->mgmt, GD_MGMT_COMMIT_OP,
NULL,
gd_xdr_from_mgmt_commit_op_req,
- this, glusterd3_1_commit_op_cbk);
+ this, glusterd3_1_commit_op_cbk,
+ (xdrproc_t)xdr_gd1_mgmt_commit_op_req);
out:
if ((_gf_true == is_alloc) && req.buf.buf_val)
@@ -1937,7 +1963,8 @@ glusterd3_1_brick_op (call_frame_t *frame, xlator_t *this,
&glusterd_glusterfs_3_1_mgmt_prog,
req->op, NULL,
gd_xdr_from_mgmt_brick_op_req,
- this, glusterd3_1_brick_op_cbk);
+ this, glusterd3_1_brick_op_cbk,
+ (xdrproc_t)xdr_gd1_mgmt_brick_op_req);
if (req) {
if (req->input.input_val)
GF_FREE (req->input.input_val);