This was meant to limit the size of any single change to 1/2 of the
max_misplaced (see the comment above!).
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit
a0d63c1a1fc673f094bb309635e98ab4c11354e9)
} else {
double room =
std::min<double>(max_misplaced - misplaced_ratio,
- misplaced_ratio / 2.0);
+ max_misplaced / 2.0);
unsigned estmax = std::max<unsigned>(
(double)p.get_pg_num() * room, 1u);
int delta = target - p.get_pgp_num();