From fe1b57da315dadc920f1ea8e3c9a645123c65036 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 22 Aug 2017 11:29:20 +0800 Subject: [PATCH] osd/PG: calc_ec_acting - kill "usable" which has no consumers. Signed-off-by: xie xingguo --- src/osd/PG.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 371e638080073..fdea3712fb889 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1142,7 +1142,6 @@ void PG::calc_ec_acting( { vector want(size, CRUSH_ITEM_NONE); map > all_info_by_shard; - unsigned usable = 0; for (map::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::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; } } -- 2.39.5