From 698038f67c00bd528a7be89a0fccdd52914e01ce Mon Sep 17 00:00:00 2001 From: Hari Gowtham Date: Tue, 3 Nov 2015 18:23:56 +0530 Subject: v info for disperse count fails while upgrading The upgrade from 3.7.5-3 to 3.7.5-5 causes the type and number of bricks for the cold tier to be printed wrong. Change-Id: Ia45b97c35fef88f9c66e15e5bdb93fd30cb342af BUG: 1277481 Signed-off-by: Hari Gowtham Reviewed-on: http://review.gluster.org/12495 Tested-by: NetBSD Build System Reviewed-by: Dan Lambright Tested-by: Dan Lambright --- xlators/mgmt/glusterd/src/glusterd-store.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'xlators/mgmt/glusterd/src') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 6d4fce23463..66cc51f5242 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -2763,10 +2763,18 @@ glusterd_store_update_volinfo (glusterd_volinfo_t *volinfo) break; case GF_CLUSTER_TYPE_TIER: - volinfo->tier_info.cold_dist_leaf_count = - glusterd_calc_dist_leaf_count ( - volinfo->tier_info.cold_replica_count, 1); - break; + if (volinfo->tier_info.cold_type == + GF_CLUSTER_TYPE_DISPERSE) + volinfo->tier_info.cold_dist_leaf_count + = volinfo->disperse_count; + else + volinfo->tier_info.cold_dist_leaf_count + = glusterd_calc_dist_leaf_count ( + volinfo->tier_info. + cold_replica_count, + 1); + + break; default: GF_ASSERT (0); -- cgit