From: Joao Eduardo Luis Date: Fri, 12 Jun 2015 18:20:32 +0000 (+0100) Subject: mon: Paxos: have wait_for_* functions requiring ops X-Git-Tag: v9.1.0~535^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2c83e1e2b09b833bea1ffe9e95e3a02e347fbfd7;p=ceph.git mon: Paxos: have wait_for_* functions requiring ops Signed-off-by: Joao Eduardo Luis --- diff --git a/src/mon/Paxos.h b/src/mon/Paxos.h index 2fe6403d5949..9b9a732dbbcb 100644 --- a/src/mon/Paxos.h +++ b/src/mon/Paxos.h @@ -1226,9 +1226,15 @@ public: * * @param c A callback */ - void wait_for_active(Context *c) { + void wait_for_active(MonOpRequestRef op, Context *c) { + if (op) + op->mark_event("paxos:wait_for_active"); waiting_for_active.push_back(c); } + void wait_for_active(Context *c) { + MonOpRequestRef o; + wait_for_active(o, c); + } /** * Trim the Paxos state as much as we can. @@ -1304,10 +1310,16 @@ public: * * @param onreadable A callback */ - void wait_for_readable(Context *onreadable) { + void wait_for_readable(MonOpRequestRef op, Context *onreadable) { assert(!is_readable()); + if (op) + op->mark_event("paxos:wait_for_readable"); waiting_for_readable.push_back(onreadable); } + void wait_for_readable(Context *onreadable) { + MonOpRequestRef o; + wait_for_readable(o, onreadable); + } /** * @} */ @@ -1340,10 +1352,16 @@ public: * * @param c A callback */ - void wait_for_writeable(Context *c) { + void wait_for_writeable(MonOpRequestRef op, Context *c) { assert(!is_writeable()); + if (op) + op->mark_event("paxos:wait_for_writeable"); waiting_for_writeable.push_back(c); } + void wait_for_writeable(Context *c) { + MonOpRequestRef o; + wait_for_writeable(o, c); + } /** * Get a transaction to submit operations to propose against