Normal ops do this so they can behave when racing with split; pgnls ops
are no different.
In particular, this fixes a bug where we have an old OSDMap that doesn't
reflect a split, and the OSD replies with a 'next' value of the PG's new
max. If we resend the same value to that PG, it'll be out of bounds,
and BlueStore will notice.
Signed-off-by: Sage Weil <sage@redhat.com>
t->osd = -1;
return RECALC_OP_TARGET_POOL_DNE;
}
- pgid = osdmap->raw_pg_to_pg(t->base_pgid);
+ if (osdmap->test_flag(CEPH_OSDMAP_SORTBITWISE)) {
+ // if the SORTBITWISE flag is set, we know all OSDs are running
+ // jewel+.
+ pgid = t->base_pgid;
+ } else {
+ // legacy behavior. pre-jewel OSDs will fail if we send a
+ // full-hash pgid value.
+ pgid = osdmap->raw_pg_to_pg(t->base_pgid);
+ }
} else {
int ret = osdmap->object_locator_to_pg(t->target_oid, t->target_oloc,
pgid);