]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: calc_ec_acting - kill "usable"
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 22 Aug 2017 03:29:20 +0000 (11:29 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 23 Aug 2017 08:41:26 +0000 (16:41 +0800)
which has no consumers.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PG.cc

index 371e638080073f2c9f5efcc02a3a9a1b2d3e2391..fdea3712fb8892389d5292ed6991b57328c1d935 100644 (file)
@@ -1142,7 +1142,6 @@ void PG::calc_ec_acting(
 {
   vector<int> want(size, CRUSH_ITEM_NONE);
   map<shard_id_t, set<pg_shard_t> > all_info_by_shard;
-  unsigned usable = 0;
   for (map<pg_shard_t, pg_info_t>::const_iterator i = all_info.begin();
        i != all_info.end();
        ++i) {
@@ -1156,7 +1155,6 @@ void PG::calc_ec_acting(
        auth_log_shard->second.log_tail) {
       ss << " selecting up[i]: " << pg_shard_t(up[i], shard_id_t(i)) << std::endl;
       want[i] = up[i];
-      ++usable;
       continue;
     }
     if (up.size() > (unsigned)i && up[i] != CRUSH_ITEM_NONE) {
@@ -1171,7 +1169,6 @@ void PG::calc_ec_acting(
        auth_log_shard->second.log_tail) {
       ss << " selecting acting[i]: " << pg_shard_t(acting[i], shard_id_t(i)) << std::endl;
       want[i] = acting[i];
-      ++usable;
     } else if (!restrict_to_up_acting) {
       for (set<pg_shard_t>::iterator j = all_info_by_shard[shard_id_t(i)].begin();
           j != all_info_by_shard[shard_id_t(i)].end();
@@ -1182,7 +1179,6 @@ void PG::calc_ec_acting(
            auth_log_shard->second.log_tail) {
          ss << " selecting stray: " << *j << std::endl;
          want[i] = j->osd;
-         ++usable;
          break;
        }
       }