}
sl.unlock();
- info->register_tid = _op_submit(o, sul);
+ _op_submit(o, sul, &info->register_tid);
} else {
// first send
- info->register_tid = _op_submit_with_budget(o, sul);
+ _op_submit_with_budget(o, sul, &info->register_tid);
}
logger->inc(l_osdc_linger_send);
ceph_tid_t Objecter::op_submit(Op *op, int *ctx_budget)
{
shunique_lock rl(rwlock, ceph::acquire_shared);
- return _op_submit_with_budget(op, rl, ctx_budget);
+ ceph_tid_t tid = 0;
+ _op_submit_with_budget(op, rl, &tid, ctx_budget);
+ return tid;
}
-ceph_tid_t Objecter::_op_submit_with_budget(Op *op, shunique_lock& sul,
- int *ctx_budget)
+void Objecter::_op_submit_with_budget(Op *op, shunique_lock& sul,
+ ceph_tid_t *ptid,
+ int *ctx_budget)
{
assert(initialized.read());
op_cancel(tid, -ETIMEDOUT); });
}
- return _op_submit(op, sul);
+ _op_submit(op, sul, ptid);
}
void Objecter::_send_op_account(Op *op)
}
}
-ceph_tid_t Objecter::_op_submit(Op *op, shunique_lock& sul)
+void Objecter::_op_submit(Op *op, shunique_lock& sul, ceph_tid_t *ptid)
{
// rwlock is locked
if (check_for_latest_map) {
_send_op_map_check(op);
}
+ if (ptid)
+ *ptid = tid;
op = NULL;
sl.unlock();
ldout(cct, 5) << num_unacked.read() << " unacked, " << num_uncommitted.read()
<< " uncommitted" << dendl;
-
- return tid;
}
int Objecter::op_cancel(OSDSession *s, ceph_tid_t tid, int r)
m->get_redirect().combine_with_locator(op->target.target_oloc,
op->target.target_oid.name);
op->target.flags |= CEPH_OSD_FLAG_REDIRECTED;
- _op_submit(op, sul);
+ _op_submit(op, sul, NULL);
m->put();
return;
}
private:
// low-level
- ceph_tid_t _op_submit(Op *op, shunique_lock& lc);
- ceph_tid_t _op_submit_with_budget(Op *op, shunique_lock& lc,
- int *ctx_budget = NULL);
+ void _op_submit(Op *op, shunique_lock& lc, ceph_tid_t *ptid);
+ void _op_submit_with_budget(Op *op, shunique_lock& lc,
+ ceph_tid_t *ptid,
+ int *ctx_budget = NULL);
inline void unregister_op(Op *op);
// public interface