From 80d091411f6d4b9bc6bd5f19c921bdb295611b5d Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 30 Aug 2010 05:52:27 +0000 Subject: mgmt/glusterd: fixed volgen creation problems Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1454 (Remove brick unsuccessful - wrong volume info) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1454 --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index b8f2cb99ac1..2f4ab6cd4bd 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1365,23 +1365,15 @@ generate_client_volfile (glusterd_volinfo_t *volinfo, char *filename) num_bricks++; if (GF_CLUSTER_TYPE_REPLICATE == volinfo->type) { - ret = dict_get_int32 (dict, "replica-count", - &replicate_count); - if (ret) - goto out; - gf_log ("", GF_LOG_DEBUG, "Volfile is distributed-replicated"); + replicate_count = volinfo->sub_count; dist_count = num_bricks / replicate_count; } else if (GF_CLUSTER_TYPE_STRIPE == volinfo->type) { - ret = dict_get_int32 (dict, "stripe-count", - &stripe_count); - if (ret) - goto out; - gf_log ("", GF_LOG_DEBUG, "Volfile is distributed-striped"); + stripe_count = volinfo->sub_count; dist_count = num_bricks / stripe_count; } else { gf_log ("", GF_LOG_DEBUG, -- cgit