Merge pull request from xiexingguo/wip-misc-cleanups

osd/OSDMap: drop local pool filter in calc_pg_upmaps

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Xie Xingguo 2019-03-01 11:23:16 +08:00 committed by GitHub
commit 4102b62c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 11 deletions

View File

@ -7210,7 +7210,7 @@ int OSDMonitor::prepare_command_pool_set(const cmdmap_t& cmdmap,
}
} else {
if (osdmap.require_osd_release < CEPH_RELEASE_NAUTILUS) {
ss << "nautilus OSDs are required to adjust pg_num_pending";
ss << "nautilus OSDs are required to decrease pg_num";
return -EPERM;
}
}

View File

@ -4312,18 +4312,10 @@ int OSDMap::calc_pg_upmaps(
CephContext *cct,
float max_deviation_ratio,
int max,
const set<int64_t>& only_pools_orig,
const set<int64_t>& only_pools,
OSDMap::Incremental *pending_inc)
{
ldout(cct, 10) << __func__ << " pools " << only_pools_orig << dendl;
set<int64_t> 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;