return -EPERM;
}
}
- // set targets; mgr will adjust pg_num_actual and pgp_num later.
- // make pgp_num track pg_num if it already matches. if it is set
- // differently, leave it different and let the user control it
- // manually.
- if (p.get_pg_num_target() == p.get_pgp_num_target()) {
- p.set_pgp_num_target(n);
+ if (osdmap.require_osd_release < ceph_release_t::nautilus) {
+ // pre-nautilus osdmap format; increase pg_num directly
+ assert(n > (int)p.get_pg_num());
+ // force pre-nautilus clients to resend their ops, since they
+ // don't understand pg_num_target changes form a new interval
+ p.last_force_op_resend_prenautilus = pending_inc.epoch;
+ // force pre-luminous clients to resend their ops, since they
+ // don't understand that split PGs now form a new interval.
+ p.last_force_op_resend_preluminous = pending_inc.epoch;
+ p.set_pg_num(n);
+ } else {
+ // set targets; mgr will adjust pg_num_actual and pgp_num later.
+ // make pgp_num track pg_num if it already matches. if it is set
+ // differently, leave it different and let the user control it
+ // manually.
+ if (p.get_pg_num_target() == p.get_pgp_num_target()) {
+ p.set_pgp_num_target(n);
+ }
+ p.set_pg_num_target(n);
}
- p.set_pg_num_target(n);
} else if (var == "pgp_num_actual") {
if (p.has_flag(pg_pool_t::FLAG_NOPGCHANGE)) {
ss << "pool pgp_num change is disabled; you must unset nopgchange flag for the pool first";
ss << "specified pgp_num " << n << " > pg_num " << p.get_pg_num_target();
return -EINVAL;
}
- p.set_pgp_num_target(n);
+ if (osdmap.require_osd_release < ceph_release_t::nautilus) {
+ // pre-nautilus osdmap format; increase pgp_num directly
+ p.set_pgp_num(n);
+ } else {
+ p.set_pgp_num_target(n);
+ }
} else if (var == "pg_autoscale_mode") {
n = pg_pool_t::get_pg_autoscale_mode_by_name(val);
if (n < 0) {