diff options
| author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2010-09-08 08:53:21 +0000 | 
|---|---|---|
| committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-08 11:24:46 -0700 | 
| commit | 43d36d456314f6d4e67c3d8f06cceb585f467915 (patch) | |
| tree | 35c7b5093dcc47eb2e6048ebf24bb05f6ebdabee /xlators/mgmt/glusterd/src/glusterd-handler.c | |
| parent | 5ed8eba1b15b538ca2c74d8130fb3f0a394921ec (diff) | |
allow brick to be added in a plain replicate volume if a brick is removed
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1574 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1574
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 6dee0355d3d..6b5b01c770d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -1386,6 +1386,12 @@ glusterd_handle_add_brick (rpcsvc_request_t *req)                          goto brick_val;                  if (!brick_count || !volinfo->sub_count)                          goto brick_val; + +                if (volinfo->brick_count < volinfo->sub_count) { +                        if ((volinfo->sub_count - volinfo->brick_count) == brick_count) +                                goto brick_val; +                } +                  if ((brick_count % volinfo->sub_count) != 0) {                          snprintf(err_str, 2048, "Incorrect number of bricks"                                  " supplied %d for type %s with count %d",  | 
