summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-07-04 02:27:06 +0000
committerAnand Avati <avati@gluster.com>2011-07-12 05:37:56 -0700
commit67f6fc6156cb14875600cd7e44d937587196e3b3 (patch)
tree49d15a52fa38948788f3176b28a52fcdb16882d7 /xlators/mgmt
parent4c55f76d6a4d13ec1ed3cffd31ff4acc3d3122f0 (diff)
glusterd: check replica_count for 0 before using it for volume creation in stripe replicate volume
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3123 ([a7cdaf3de307c96cb55219a0743962ee1e1fc955]: glusterd crashed when started) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3123
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 250d9b26c2a..fc4ffa8c31b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1618,6 +1618,8 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
break;
case GF_CLUSTER_TYPE_STRIPE_REPLICATE:
/* Replicate after the clients, then stripe */
+ if (volinfo->replica_count == 0)
+ return -1;
sub_count = volinfo->replica_count;
cluster_args = replicate_args;
break;