diff options
author | Kaushal M <kaushal@redhat.com> | 2013-05-06 18:04:47 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-06-05 05:24:06 -0700 |
commit | 4965109a3c7d456b9f19eb67cf023ba86069e6e7 (patch) | |
tree | 5333b5aff436e3ec08bab07c8757917127423ee8 /xlators/mgmt/glusterd/src/glusterd-brick-ops.c | |
parent | 96c530295eaf8b8ba6e231e6c77fa1cb9302498d (diff) |
glusterd: Backport of vme table changes from master
This patch backports the following changes from the master branch
99fe09f glusterd: Moved the volume entry table to a separate file.
e306d08 glusterd: Changing the volume entry table's representation.
eac54f6 glusterd: Added option description, and validation function fields.
bcb4235 glusterd: Added validation function for performance cache max and min size.
8897d08 glusterd: Added validation function for quota-timeout.
4579609 glusterd: Added validation function for stripe-block-size.
6788bad glusterd: Fix some options in vme table
549231d glusterd: Added the validation function for subvols-per-directory
9636e63 glusterd: Added description for nfs.transport-type option in volume set help.
Change-Id: I4a64ad94f17df4b45a3a32262a83e2c35fb5f7da
BUG: 907311
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4956
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 1d927044ef5..e26d65ff1cb 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -928,13 +928,15 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count, if (stripe_count) { volinfo->stripe_count = stripe_count; } - volinfo->dist_leaf_count = (volinfo->stripe_count * - volinfo->replica_count); + volinfo->dist_leaf_count = glusterd_get_dist_leaf_count (volinfo); /* backward compatibility */ volinfo->sub_count = ((volinfo->dist_leaf_count == 1) ? 0: volinfo->dist_leaf_count); + volinfo->subvol_count = (volinfo->brick_count / + volinfo->dist_leaf_count); + ret = glusterd_create_volfiles_and_notify_services (volinfo); if (ret) goto out; @@ -1625,8 +1627,10 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr) volinfo->replica_count, replica_count, volinfo->volname); volinfo->replica_count = replica_count; - volinfo->dist_leaf_count = (volinfo->stripe_count * - replica_count); + volinfo->dist_leaf_count = glusterd_get_dist_leaf_count (volinfo); + volinfo->subvol_count = (volinfo->brick_count / + volinfo->dist_leaf_count); + if (replica_count == 1) { if (volinfo->type == GF_CLUSTER_TYPE_REPLICATE) { volinfo->type = GF_CLUSTER_TYPE_NONE; |