Skip to content

Commit c3f6bfb

Browse files
committed
osdc: Interface to submit IO with ASIO Post.
For direct read failures, the locking is such that we cannot immediately send a new IO without deadlocking. This new interface allows an op to be sent as an asio post. Signed-off-by: Alex Ainscow <[email protected]>
1 parent 3202d9c commit c3f6bfb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/osdc/Objecter.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,13 @@ void Objecter::resend_mon_ops()
23372337

23382338
// read | write ---------------------------
23392339

2340+
2341+
void Objecter::op_post_submit(Op* op) {
2342+
boost::asio::post(service, [this, op]() {
2343+
op_submit(op);
2344+
});
2345+
}
2346+
23402347
void Objecter::op_submit(Op *op, ceph_tid_t *ptid, int *ctx_budget)
23412348
{
23422349
shunique_lock rl(rwlock, ceph::acquire_shared);

src/osdc/Objecter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2808,6 +2808,7 @@ class Objecter : public md_config_obs_t, public Dispatcher {
28082808
int *ctx_budget = NULL);
28092809
// public interface
28102810
public:
2811+
void op_post_submit(Op *op);
28112812
void op_submit(Op *op, ceph_tid_t *ptid = NULL, int *ctx_budget = NULL);
28122813
bool is_active() {
28132814
std::shared_lock l(rwlock);

0 commit comments

Comments
 (0)