From: xie xingguo Date: Sat, 23 Feb 2019 00:33:40 +0000 (+0800) Subject: osd/OSDMap: drop local pool filter in calc_pg_upmaps X-Git-Tag: v12.2.12~24^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ab2dbc20893c99e26ba365823ed68b96f03f0f37;p=ceph.git osd/OSDMap: drop local pool filter in calc_pg_upmaps The local pre-loaded pool filter is completely redundant since the below check: if (!only_pools.empty() && !only_pools.count(i.first)) could reliably catch both cases - either optimization should be restricted to specific pools feeded, or all existing pools. Let's clean it up. Signed-off-by: xie xingguo (cherry picked from commit 3e6bad9821b5fb3e780d970666fbdfbf217d905e) --- diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index 9ce294820a7..78a5e995761 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -4006,18 +4006,10 @@ int OSDMap::calc_pg_upmaps( CephContext *cct, float max_deviation_ratio, int max, - const set& only_pools_orig, + const set& only_pools, OSDMap::Incremental *pending_inc) { - ldout(cct, 10) << __func__ << " pools " << only_pools_orig << dendl; - set only_pools; - if (only_pools_orig.empty()) { - for (auto& i : pools) { - only_pools.insert(i.first); - } - } else { - only_pools = only_pools_orig; - } + ldout(cct, 10) << __func__ << " pools " << only_pools << dendl; OSDMap tmp; tmp.deepish_copy_from(*this); int num_changed = 0;