From cd611b4b7affe593e965b87bbb32e05998fea5d0 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Mon, 12 May 2014 01:26:56 +0200 Subject: [PATCH] MDBalancer.cc: remove some since 2009 unused code Remove some since long time unused code and variables (commented out since 2009). Fix for: [src/mds/MDBalancer.cc:757]: (style) Variable 'total_sent' is assigned a value that is never used. [src/mds/MDBalancer.cc:665]: (style) Variable 'total_goal' is assigned a value that is never used. Signed-off-by: Danny Al-Gaaf --- src/mds/MDBalancer.cc | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/mds/MDBalancer.cc b/src/mds/MDBalancer.cc index 35c995dae9465..1cc70cfa808c1 100644 --- a/src/mds/MDBalancer.cc +++ b/src/mds/MDBalancer.cc @@ -643,26 +643,12 @@ void MDBalancer::try_rebalance() // do my exports! set already_exporting; - double total_sent = 0; - double total_goal = 0; for (map::iterator it = my_targets.begin(); it != my_targets.end(); ++it) { - - /* - double fac = 1.0; - if (false && total_goal > 0 && total_sent > 0) { - fac = total_goal / total_sent; - dout(0) << " total sent is " << total_sent << " / " << total_goal << " -> fac 1/ " << fac << dendl; - if (fac > 1.0) fac = 1.0; - } - fac = .9 - .4 * ((float)g_conf->num_mds / 128.0); // hack magic fixme - */ - int target = (*it).first; double amount = (*it).second; - total_goal += amount; if (amount < MIN_OFFLOAD) continue; if (amount / target_load < .2) continue; @@ -708,7 +694,6 @@ void MDBalancer::try_rebalance() } } if (amount-have < MIN_OFFLOAD) { - total_sent += have; continue; } @@ -735,7 +720,6 @@ void MDBalancer::try_rebalance() } if (amount-have < MIN_OFFLOAD) { //fudge = amount-have; - total_sent += have; continue; } @@ -754,7 +738,6 @@ void MDBalancer::try_rebalance() break; } //fudge = amount - have; - total_sent += have; for (list::iterator it = exports.begin(); it != exports.end(); ++it) { dout(0) << " - exporting " -- 2.39.5