summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPranith K <pranithk@gluster.com>2010-10-27 05:10:19 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-10-27 04:13:43 -0700
commit7efad96683f605d5a0eb21b0377a6e14b89cd910 (patch)
treed2dd73faad0776bd05f921821c27d7f90b7694b7 /xlators
parent0e1bead7b77adab9115b2af977bc78273a34a70d (diff)
mgmt/glusterd: update brick-count as soon as it is added in add-brick
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2023 (add-brick fails in regression) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2023
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c4
1 files changed, 2 insertions, 2 deletions
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);