]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
MDBalancer.cc: remove some since 2009 unused code
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sun, 11 May 2014 23:26:56 +0000 (01:26 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sun, 11 May 2014 23:26:56 +0000 (01:26 +0200)
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 <danny.al-gaaf@bisect.de>
src/mds/MDBalancer.cc

index 35c995dae9465abc48af1cea8bbf67f5704f5ae4..1cc70cfa808c1f18d04a401b7de2ef5fab5f1c25 100644 (file)
@@ -643,26 +643,12 @@ void MDBalancer::try_rebalance()
 
   // do my exports!
   set<CDir*> already_exporting;
-  double total_sent = 0;
-  double total_goal = 0;
 
   for (map<int,double>::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<CDir*>::iterator it = exports.begin(); it != exports.end(); ++it) {
       dout(0) << "   - exporting "