From 97a6969117272f49e198b422fcda4ffcab821852 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 20 Jan 2015 19:20:55 -0800 Subject: [PATCH] mon: do not prime pg_temp when the current acting is < min_size The PG is down anyway. Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 8a1c9244f9b..24460a27c8c 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -721,6 +721,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