summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-10-02 18:44:14 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-02 22:19:05 -0700
commite463cb64d99cf741fabf9e46f7511554607e250e (patch)
tree8b7946345fe6affcefdd950bbf68fb8b912f5eca /xlators
parenta3bf2a40fbd0b1b7478e0fbf87dd5a1a9c42e5ab (diff)
volgen: fix up replace-brick + pump generation
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1750 (clean up volgen) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1750
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 9ef9a733081..59f20a885ed 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -533,6 +533,7 @@ server_graph_builder (glusterfs_graph_t *graph, glusterd_volinfo_t *volinfo,
int pump = 0;
xlator_t *xl = NULL;
xlator_t *txl = NULL;
+ xlator_t *rbxl = NULL;
char *aaa = NULL;
int ret = 0;
char transt[16] = {0,};
@@ -559,28 +560,33 @@ server_graph_builder (glusterfs_graph_t *graph, glusterd_volinfo_t *volinfo,
ret = dict_get_int32 (volinfo->dict, "enable-pump", &pump);
if (ret == -ENOENT)
- pump = 0;
+ ret = pump = 0;
+ if (ret)
+ return -1;
if (pump) {
txl = first_of (graph);
- xl = volgen_graph_add_as (graph, "protocol/client", "%s-%s",
- volname, "replace-brick");
- if (!xl)
+ rbxl = volgen_graph_add_nolink (graph, "protocol/client",
+ "%s-replace-brick", volname);
+ if (!rbxl)
return -1;
- ret = xlator_set_option (xl, "transport-type", transt);
+ ret = xlator_set_option (rbxl, "transport-type", transt);
if (ret)
return -1;
- ret = xlator_set_option (xl, "remote-port", "34034");
+ ret = xlator_set_option (rbxl, "remote-port", "34034");
if (ret)
return -1;
- xl = volgen_graph_add (graph, "cluster/pump", volname);
+ xl = volgen_graph_add_nolink (graph, "cluster/pump", "%s-pump",
+ volname);
if (!xl)
return -1;
-
ret = volgen_xlator_link (xl, txl);
if (ret)
return -1;
+ ret = volgen_xlator_link (xl, rbxl);
+ if (ret)
+ return -1;
}
xl = volgen_graph_add (graph, "performance/io-threads", volname);