diff options
author | shishir gowda <shishirng@gluster.com> | 2011-03-16 03:35:46 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-16 02:35:34 -0700 |
commit | 10eafa32914f2458f3bb30073724758a95a82310 (patch) | |
tree | 3ef5b8f16b28451fafc66be01725fe2fd13f8054 /xlators/mgmt/glusterd/src/glusterd-handler.c | |
parent | 3d1fc9ebe2b0292108dd0737cf8f40d6fcb8cf51 (diff) |
TOP: glusterd/mgmt related changes
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2516 (Implement gluster volume top command)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2516
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index d4e2dd344b9..e4334af4dfb 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -2981,7 +2981,7 @@ glusterd_handle_cli_profile_volume (rpcsvc_request_t *req) gf_boolean_t free_volname = _gf_true; int lock_fail = 0; glusterd_op_t cli_op = GD_OP_PROFILE_VOLUME; - + dict_t *tmp_dict = NULL; GF_ASSERT (req); @@ -3021,13 +3021,27 @@ glusterd_handle_cli_profile_volume (rpcsvc_request_t *req) goto out; } + tmp_dict = dict_new(); + if (!tmp_dict) + goto out; + dict_unserialize (cli_req.dict_req.dict_req_val, + cli_req.dict_req.dict_req_len, &tmp_dict); + + dict_copy (tmp_dict, dict); + ret = glusterd_op_begin (req, cli_op, dict, _gf_true); out: glusterd_friend_sm (); glusterd_op_sm (); - if (ret) + + if (tmp_dict) + dict_unref (tmp_dict); + + if (ret) dict_unref (dict); + if (cli_req.dict_req.dict_req_val) + free (cli_req.dict_req.dict_req_val); if (free_volname) free (cli_req.volname); // malloced by xdr if (ret) { |