This was returning a machine-code success if users tried to merge, and
was erroneously (but harmlessly) increasing the pool's last_change
marker even though it wasn't actually changing anything.
Backport: emperor
Signed-off-by: Greg Farnum <greg@inktank.com>
}
if (n <= (int)p.get_pg_num()) {
ss << "specified pg_num " << n << " <= current " << p.get_pg_num();
+ if (n < (int)p.get_pg_num())
+ return -EEXIST;
+ else
+ return 0;
} else {
for(set<pg_t>::iterator i = mon->pgmon()->pg_map.creating_pgs.begin();
i != mon->pgmon()->pg_map.creating_pgs.end();