Merge pull request #14979 from liewegas/wip-19874

mon: fix prime_pg_temp overrun
common/Finisher: fix uninitialized variable warning

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Sage Weil 2017-05-05 17:42:38 -05:00 committed by GitHub
commit 952a7beb61
2 changed files with 2 additions and 1 deletions

View File

@ -1077,7 +1077,7 @@ void OSDMonitor::prime_pg_temp(
return;
}
}
if (!osdmap.have_pg_pool(pgid.pool())) {
if (!osdmap.pg_exists(pgid)) {
return;
}

View File

@ -285,6 +285,7 @@ public:
int *acting_primary) const {
auto p = pools.find(pgid.pool());
assert(p != pools.end());
assert(pgid.ps() < p->second.pg_num);
p->second.get(pgid.ps(), up, up_primary, acting, acting_primary);
}