Request map *and* resend. We don't have map epoch info about when the
reply was sent, and the OSD isn't ordering with respect to epochs anyway.
So, resend now, just in case we already saw a map change, or because we
were suffering from a peering vs command race on the OSD side, and then
also request a new map from the mon, in case we are missing a map update.
Signed-off-by: Sage Weil <sage@redhat.com>
ss << "not primary for pgid " << pgid;
// do not reply; they will get newer maps and realize they
// need to resend.
-#warning fixme on client side
pg->unlock();
ret = -EAGAIN;
goto out;
sl.unlock();
return;
}
+ if (m->r == -EAGAIN) {
+ ldout(cct,10) << __func__ << " tid " << m->get_tid()
+ << " got EAGAIN, requesting map and resending" << dendl;
+ // NOTE: This might resend twice... once now, and once again when
+ // we get an updated osdmap and the PG is found to have moved.
+ _maybe_request_map();
+ _send_command(c);
+ m->put();
+ sl.unlock();
+ return;
+ }
+
if (c->poutbl) {
c->poutbl->claim(m->get_data());
}