diff options
author | Amar Tumballi <amar@gluster.com> | 2011-09-15 12:57:44 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-23 06:48:32 -0700 |
commit | 76580479033087f6dde080c27618baf19b18b658 (patch) | |
tree | 89a6b37046df9dc859e7f8ac7acd3f9115c69c2f /xlators/mgmt/glusterd/src/glusterd-op-sm.c | |
parent | 1b096c3ff0a4c25ff22a32d9594d2e289a3d67ea (diff) |
glusterd: cleanup of volinfo '*_count' definitionsv3.3.0qa11
earlier, sub_count was having different meaning depending on the
volume type.
now, for replica and stripe count, one can directly access the
'replica_count' or 'stripe_count' to get the corresponding
value from the volume info. 'sub_count' is preserved as is for backward
compatibility. there is a new variable 'dist_leaf_count' to get
info about how many bricks are present in one distribute sub volume.
Change-Id: I5ea1c8f9ae08f584cca63b91ba69035c7e4350ca
BUG: 3158
Reviewed-on: http://review.gluster.com/435
Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 84280498e8b..11cbeba0851 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -2746,16 +2746,7 @@ glusterd_bricks_select_heal_volume (dict_t *dict, char **op_errstr) goto out; } - if (volinfo->type == GF_CLUSTER_TYPE_STRIPE_REPLICATE) { - replica_count = volinfo->replica_count; - - } else if (volinfo->type == GF_CLUSTER_TYPE_REPLICATE) { - replica_count = volinfo->sub_count; - - } else { - GF_ASSERT (0); - goto out; - } + replica_count = volinfo->replica_count; index = 1; list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) { |