From acd2c4dc93381df9806243b6d367a36301e5eb66 Mon Sep 17 00:00:00 2001 From: Pranith K Date: Sun, 26 Sep 2010 23:55:41 +0000 Subject: mgmt/glusterd: perform post operations of volume set Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1708 (update store, re-compute checksum, restart nfs for volume set) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1708 --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index e8aa93b4fa4..91f833cd9a9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -2637,8 +2637,8 @@ glusterd_op_set_volume (gd1_mgmt_stage_op_req *req) sprintf (str, "key%d", count); ret = dict_get_str (dict, str, &key); - - if (ret) + + if (ret) break; sprintf (str, "value%d", count); @@ -2652,7 +2652,7 @@ glusterd_op_set_volume (gd1_mgmt_stage_op_req *req) } ret = set_xlator_option (volinfo->dict, key, value); - + if (ret) { gf_log ("", GF_LOG_ERROR, "Unable to set the options" "in 'volume set'"); @@ -2676,14 +2676,21 @@ glusterd_op_set_volume (gd1_mgmt_stage_op_req *req) goto out; } + ret = glusterd_store_update_volume (volinfo); + if (ret) + goto out; + ret = glusterd_volume_compute_cksum (volinfo); + if (ret) + goto out; - - gf_log ("", GF_LOG_DEBUG, "Received set volume command"); + if (GLUSTERD_STATUS_STARTED == volinfo->status) + ret = glusterd_check_generate_start_nfs (volinfo); ret = 0; out: + gf_log ("", GF_LOG_DEBUG, "returning %d", ret); return ret; } -- cgit