summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2013-01-30 15:23:48 +0530
committerAnand Avati <avati@redhat.com>2013-02-08 19:09:29 -0800
commit13b92b4f418cc8e34da95a31c583411bae595f4e (patch)
treece6c66dbecd790a54ad28c1db1d4237999aacaf1 /xlators
parentbbd6fb6e98f414719fc0a63c7de03d360154aa21 (diff)
glusterd: Made gsync set use synctask framework
Change-Id: I409fa5a9f55434ece47a8a51d4812d3eca42d269 BUG: 852147 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4473 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c2
2 files changed, 2 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index 5a6369c4c71..758ab1a14af 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -140,13 +140,9 @@ glusterd_handle_gsync_set (rpcsvc_request_t *req)
break;
}
- ret = glusterd_op_begin (req, GD_OP_GSYNC_SET, dict,
- err_str, sizeof (err_str));
+ ret = glusterd_op_begin_synctask (req, GD_OP_GSYNC_SET, dict);
out:
- glusterd_friend_sm ();
- glusterd_op_sm ();
-
if (ret) {
if (err_str[0] == '\0')
snprintf (err_str, sizeof (err_str),
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 09fc5aa51ef..093c59ce87a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -6471,7 +6471,7 @@ glusterd_gsync_use_rsp_dict (dict_t *aggr, dict_t *rsp_dict, char *op_errstr)
if (ret)
goto out;
}
- if (strcmp ("", op_errstr)) {
+ if ((op_errstr) && (strcmp ("", op_errstr))) {
ret = dict_set_dynstr (ctx, "errstr", gf_strdup(op_errstr));
if (ret)
goto out;