Skip to content

Commit

Permalink
mon: do not prime pg_temp when the current acting is < min_size
Browse files Browse the repository at this point in the history
The PG is down anyway.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 97a6969)
  • Loading branch information
liewegas authored and Robert LeBlanc committed Feb 29, 2016
1 parent 01533f1 commit 6315c83
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mon/OSDMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,11 @@ void OSDMonitor::prime_pg_temp(OSDMap& next,
&cur_acting, &acting_primary);
if (cur_acting == acting)
return; // no change this epoch; must be stale pg_stat
if (cur_acting.empty())
return; // if previously empty now we can be no worse off
const pg_pool_t *pool = next.get_pg_pool(pp->first.pool());
if (pool && cur_acting.size() < pool->min_size)
return; // can be no worse off than before

dout(20) << __func__ << " " << pp->first << " " << cur_up << "/" << cur_acting
<< " -> " << up << "/" << acting
Expand Down

0 comments on commit 6315c83

Please sign in to comment.