If we just created a new pool and it's basically empty, there is no reason
to throttle the pgp_num changes.
Signed-off-by: Sage Weil <sage@redhat.com>
// max_misplaced, to somewhat limit the magnitude of
// our potential error here.
int next;
- if (aggro) {
+
+ pool_stat_t s = pg_map.get_pg_pool_sum_stat(i.first);
+ if (aggro ||
+ // pool is (virtually) empty; just jump to final pgp_num?
+ (p.get_pgp_num_target() > p.get_pgp_num() &&
+ s.stats.sum.num_objects <= p.get_pgp_num_target())) {
next = target;
} else {
double room =