summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-11-12 22:02:37 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-16 01:46:50 -0800
commitdeac165b27d09e762743b180044c33ce90bbeaef (patch)
tree5a62ee9abd7e80dce99742b03aa51abd9830f201 /xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
parenta29ab15988f46fbe98151c37676185de970fb187 (diff)
mgmt/glusterd: delete volume to have dictionary as context
earlier only DELETE_VOLUME was having volume name as context, where as all other OPs used to have dictionary Change-Id: I5bfcc458bff3295374eb4f0b0a31f6134745debd BUG: 3158 Reviewed-on: http://review.gluster.com/718 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rpc-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c33
1 files changed, 8 insertions, 25 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index f6b0908ae9b..d6ec18a3db3 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -1541,19 +1541,11 @@ glusterd3_1_stage_op (call_frame_t *frame, xlator_t *this,
glusterd_get_uuid (&req.uuid);
req.op = glusterd_op_get_op ();
- if (GD_OP_DELETE_VOLUME == req.op) {
- ret = dict_get_str (dict, "volname", &req.buf.buf_val);
- if (ret)
- goto out;
- req.buf.buf_len = strlen (req.buf.buf_val);
- is_alloc = _gf_false;
- } else {
- ret = dict_allocate_and_serialize (dict, &req.buf.buf_val,
- (size_t *)&req.buf.buf_len);
+ ret = dict_allocate_and_serialize (dict, &req.buf.buf_val,
+ (size_t *)&req.buf.buf_len);
+ if (ret)
+ goto out;
- if (ret)
- goto out;
- }
dummy_frame = create_frame (this, this->ctx->pool);
if (!dummy_frame)
@@ -1603,19 +1595,10 @@ glusterd3_1_commit_op (call_frame_t *frame, xlator_t *this,
glusterd_get_uuid (&req.uuid);
req.op = glusterd_op_get_op ();
- if (GD_OP_DELETE_VOLUME == req.op) {
- ret = dict_get_str (dict, "volname", &req.buf.buf_val);
- if (ret)
- goto out;
- req.buf.buf_len = strlen (req.buf.buf_val);
- is_alloc = _gf_false;
- } else {
- ret = dict_allocate_and_serialize (dict, &req.buf.buf_val,
- (size_t *)&req.buf.buf_len);
-
- if (ret)
- goto out;
- }
+ ret = dict_allocate_and_serialize (dict, &req.buf.buf_val,
+ (size_t *)&req.buf.buf_len);
+ if (ret)
+ goto out;
dummy_frame = create_frame (this, this->ctx->pool);
if (!dummy_frame)