diff options
author | Amar Tumballi <amar@gluster.com> | 2011-09-26 20:43:17 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-27 05:35:03 -0700 |
commit | 68ff38bd2f77c62cd0c5729b047003694a7d63af (patch) | |
tree | d7c0f052f08dc0da1eb01f127405c7e1b090dc71 | |
parent | b894944857a7ce61a3bd31566d6169ed8d19ce8b (diff) |
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 <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 6 |
1 files 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 f488996c0..75087d547 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 |