]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: do not prime pg_temp when the current acting is < min_size 3429/head
authorSage Weil <sage@redhat.com>
Wed, 21 Jan 2015 03:20:55 +0000 (19:20 -0800)
committerSage Weil <sage@redhat.com>
Wed, 21 Jan 2015 03:20:55 +0000 (19:20 -0800)
The PG is down anyway.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 8a1c9244f9b38480e2495c307d5ff12a275b735b..24460a27c8c6a83839ec1b0dfce2f98e693b8ce7 100644 (file)
@@ -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