osdc/Objecter: unify disparate EAGAIN handling paths into one

We had two different code paths for EAGAIN that both
seemed to resend the same request again (with a new
tid), but implemneted it in two different ways. Further,
the first one was conditioned on the BALANCE_READS
flag but not LOCALIZED_READS, which should (I think) be
equivalent in this context.

Unify them into a single path.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-07-27 12:13:39 -04:00
parent 105435a38e
commit a98a2619b3

View File

@ -3415,9 +3415,6 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
if (rc == -EAGAIN) {
ldout(cct, 7) << " got -EAGAIN, resubmitting" << dendl;
if ((op->target.flags & CEPH_OSD_FLAG_BALANCE_READS)
&& (op->target.acting_primary != op->target.osd)) {
if (op->onfinish)
num_in_flight--;
_session_op_remove(s, op);
@ -3425,24 +3422,14 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
put_session(s);
op->tid = 0;
op->target.flags &= ~CEPH_OSD_FLAG_BALANCE_READS;
op->target.flags &= ~(CEPH_OSD_FLAG_BALANCE_READS |
CEPH_OSD_FLAG_LOCALIZE_READS);
op->target.pgid = pg_t();
_op_submit(op, sul, NULL);
m->put();
return;
}
// new tid
s->ops.erase(op->tid);
op->tid = ++last_tid;
_send_op(op);
sl.unlock();
put_session(s);
m->put();
return;
}
sul.unlock();
if (op->objver)