From 7efad96683f605d5a0eb21b0377a6e14b89cd910 Mon Sep 17 00:00:00 2001 From: Pranith K Date: Wed, 27 Oct 2010 05:10:19 +0000 Subject: mgmt/glusterd: update brick-count as soon as it is added in add-brick Signed-off-by: Pranith Kumar K Signed-off-by: Anand V. Avati BUG: 2023 (add-brick fails in regression) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2023 --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 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 6341fd0f3d8..93eeb38d529 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -1477,6 +1477,8 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count, list_add_tail (&brickinfo->brick_list, &volinfo->bricks); brick = strtok_r (NULL, " \n", &saveptr); i++; + volinfo->brick_count++; + } brick_list = gf_strdup (bricks); @@ -1506,8 +1508,6 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count, brick = strtok_r (NULL, " \n", &saveptr); } - volinfo->brick_count += count; - out: if (free_ptr1) GF_FREE (free_ptr1); -- cgit