]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: LogMonitor: implements C_MonOp on op-related callback contexts
authorJoao Eduardo Luis <joao@suse.de>
Wed, 17 Jun 2015 09:59:44 +0000 (10:59 +0100)
committerJoao Eduardo Luis <joao@suse.de>
Thu, 16 Jul 2015 17:06:07 +0000 (18:06 +0100)
These contexts deal with MonOpRequests, and we need to track their life
cycle; use C_MonOp to mark events when the callbacks are woken up for
some reason.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
src/mon/LogMonitor.h

index a298d52a1039646123b37052c647eb7a0b2bfb33..6dcee8b85cbcb49d2781a2db68a7e525dc8a0d6b 100644 (file)
@@ -130,11 +130,11 @@ private:
     return true;
   }
 
-  struct C_Log : public Context {
+  struct C_Log : public C_MonOp {
     LogMonitor *logmon;
-    MonOpRequestRef op;
-    C_Log(LogMonitor *p, MonOpRequestRef o) : logmon(p), op(o) {}
-    void finish(int r) {
+    C_Log(LogMonitor *p, MonOpRequestRef o) : 
+      C_MonOp(o), logmon(p) {}
+    void _finish(int r) {
       if (r == -ECANCELED) {
        return;
       }