diff options
author | Kaushal M <kaushal@redhat.com> | 2012-03-14 18:28:09 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-03-14 09:51:13 -0700 |
commit | bf65ae4fef113d78b7555db8520cd9f64817eda2 (patch) | |
tree | 5ded3baa3a34ef67724b6b1d7769aa71be44335c | |
parent | 160ff641157359dc60d1a37652ef449b3c21ebad (diff) |
glusterd: Fix brick op to prevent glusterd crashing
Was building payload only for node types GD_NODE_BRICK & GD_NODE_NFS.
Payload wasn't being built for nodes GD_NODE_SHD & GD_NODE_REBALANCE, which made
glusterd crash when those operations were performed.
Also fix a compile warning.
Change-Id: Id33e21c84901d4d112c54514b7f16add31aeb950
BUG: 803313
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/2946
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
-rw-r--r-- | cli/src/cli-rpc-ops.c | 4 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rpc-ops.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index dbef04a99f8..c47c08e3d18 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -3786,9 +3786,9 @@ gf_cli3_1_profile_volume_cbk (struct rpc_req *req, struct iovec *iov, snprintf (str, sizeof (str), "NFS Server : %s", brick); else snprintf (str, sizeof (str), "Brick: %s", brick); - cli_out (str); + cli_out ("%s", str); memset (str, '-', strlen (str)); - cli_out (str); + cli_out ("%s", str); snprintf (key, sizeof (key), "%d-cumulative", i); ret = dict_get_int32 (dict, key, &interval); diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c index 1a10666c2db..c4e9afaacef 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c @@ -1853,16 +1853,16 @@ glusterd3_1_brick_op (call_frame_t *frame, xlator_t *this, if (!dummy_frame) continue; - if (pending_node->type == GD_NODE_BRICK) - ret = glusterd_brick_op_build_payload - (req_ctx->op, pending_node->node, - (gd1_mgmt_brick_op_req **)&req, - req_ctx->dict); - else if (pending_node->type == GD_NODE_NFS) + if (pending_node->type == GD_NODE_NFS) ret = glusterd_nfs_op_build_payload (req_ctx->op, (gd1_mgmt_brick_op_req **)&req, req_ctx->dict); + else + ret = glusterd_brick_op_build_payload + (req_ctx->op, pending_node->node, + (gd1_mgmt_brick_op_req **)&req, + req_ctx->dict); if (ret) goto out; |