We were pessimistically calculating the request mapping to ensure
that it is really meant for us before looking up the PG. Instead,
look up the PG, and queue it there if we have it--the PG already
does the necessary checks in PG::can_discard_op(). If we
don't have the PG, *then* do the crush mapping and extra checks.
Reported-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Sage Weil <sage@redhat.com>
return;
}
+ PG *pg = get_pg_or_queue_for_pg(pgid, op);
+ if (pg) {
+ op->send_map_update = share_map.should_send;
+ op->sent_epoch = m->get_map_epoch();
+ enqueue_op(pg, op);
+ share_map.should_send = false;
+ return;
+ }
+
+ // ok, we didn't have the PG. let's see if it's our fault or the client's.
+
OSDMapRef send_map = service.try_get_map(m->get_map_epoch());
// check send epoch
if (!send_map) {
<< dendl;
return;
}
-
- PG *pg = get_pg_or_queue_for_pg(pgid, op);
- if (pg) {
- op->send_map_update = share_map.should_send;
- op->sent_epoch = m->get_map_epoch();
- enqueue_op(pg, op);
- share_map.should_send = false;
- }
}
template<typename T, int MSGTYPE>