OSDMapRef send_map = service.try_get_map(m->get_map_epoch());
// check send epoch
if (!send_map) {
-
- dout(7) << "don't have sender's osdmap; assuming it was valid and that client will resend" << dendl;
+ dout(7) << "don't have sender's osdmap; assuming it was valid and that"
+ << " client will resend" << dendl;
return;
}
if (!send_map->have_pg_pool(pgid.pool())) {
<< " when pool " << m->get_pg().pool() << " did not exist"
<< "\n";
return;
- } else if (send_map->get_pg_acting_role(pgid.pgid, whoami) < 0) {
+ }
+ if (!send_map->osd_is_valid_op_target(pgid.pgid, whoami)) {
dout(7) << "we are invalid target" << dendl;
clog->warn() << m->get_source_inst() << " misdirected " << m->get_reqid()
<< " pg " << m->get_pg()
// check against current map too
if (!osdmap->have_pg_pool(pgid.pool()) ||
- osdmap->get_pg_acting_role(pgid.pgid, whoami) < 0) {
- dout(7) << "dropping; no longer have PG (or pool); client will retarget" << dendl;
+ !osdmap->osd_is_valid_op_target(pgid.pgid, whoami)) {
+ dout(7) << "dropping; no longer have PG (or pool); client will retarget"
+ << dendl;
return;
}