From ace96bd16a462bda91b471a33296dbcf41375607 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 back-port of : http://review.gluster.org/#/c/12495/ 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 Change-Id: Ic61dd1378c8efe37d797328719ba16e64ff76f55 BUG: 1277984 Signed-off-by: Hari Gowtham Reviewed-on: http://review.gluster.org/12506 Tested-by: NetBSD Build System Tested-by: Gluster 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/glusterd-store.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 44f137a3c04..02291b1f838 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -2767,10 +2767,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