From 68ff38bd2f77c62cd0c5729b047003694a7d63af Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 26 Sep 2011 20:43:17 +0530 Subject: glusted: while doing add-brick, handle distribute volume separately so the logic of different type of counts etc won't come into action, which would fail the add-brick operation. Change-Id: I5c8769d6d1c2433ffb084e5dce9c1e01678cff40 BUG: 3630 Reviewed-on: http://review.gluster.com/505 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index f488996c04d..75087d54771 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -127,6 +127,9 @@ glusterd_handle_add_brick (rpcsvc_request_t *req) } + if (volinfo->type == GF_CLUSTER_TYPE_NONE) + goto brick_val; + /* If any of this is true, some thing is wrong */ if (!brick_count || !volinfo->sub_count) { ret = -1; @@ -135,9 +138,6 @@ glusterd_handle_add_brick (rpcsvc_request_t *req) goto out; } - if (volinfo->type == GF_CLUSTER_TYPE_NONE) - goto brick_val; - total_bricks = volinfo->brick_count + brick_count; /* If the brick count is less than dist_leaf_count then, allow add-brick only for plain replicate volume since in plain stripe -- cgit