We have a little block to clean them up if we get back EAGAIN, but it's
actually leaking map references; we will also use this for redirects
from the OSDs.
Signed-off-by: Greg Farnum <greg@inktank.com>
}
}
+void Objecter::unregister_op(Op *op)
+{
+ if (op->onack)
+ num_unacked--;
+ if (op->oncommit)
+ num_uncommitted--;
+ ops.erase(op->tid);
+}
+
/* This function DOES put the passed message before returning */
void Objecter::handle_osd_op_reply(MOSDOpReply *m)
{
if (rc == -EAGAIN) {
ldout(cct, 7) << " got -EAGAIN, resubmitting" << dendl;
- if (op->onack)
- num_unacked--;
- if (op->oncommit)
- num_uncommitted--;
+ unregister_op(op);
op_submit(op);
m->put();
return;
// low-level
tid_t op_submit(Op *op);
tid_t _op_submit(Op *op);
+ inline void unregister_op(Op *op);
// public interface
public: