]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MDSMonitor: move C_Updated class to .cc file 10668/head
authorMichal Jarzabek <stiopa@gmail.com>
Wed, 10 Aug 2016 20:21:28 +0000 (21:21 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Wed, 10 Aug 2016 20:21:28 +0000 (21:21 +0100)
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/mon/MDSMonitor.cc
src/mon/MDSMonitor.h

index c72fd5a05a82748288340ed633f4457fac9fbec3..611a84bb7f85603db421079833af5a4b67e964df 100644 (file)
@@ -480,6 +480,24 @@ bool MDSMonitor::prepare_update(MonOpRequestRef op)
 }
 
 
+namespace {
+class C_Updated : public Context {
+  MDSMonitor *mm;
+  MonOpRequestRef op;
+public:
+  C_Updated(MDSMonitor *a, MonOpRequestRef c) :
+    mm(a), op(c) {}
+  void finish(int r) {
+    if (r >= 0)
+      mm->_updated(op);   // success
+    else if (r == -ECANCELED) {
+      mm->mon->no_reply(op);
+    } else {
+      mm->dispatch(op);        // try again
+    }
+  }
+};
+}
 
 bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
 {
index 2c70aff24fda7c925f05f1abfd97871b7fb6d992..ddd0569c026ed9c9242ecb5c01926c3b265a0abb 100644 (file)
@@ -46,24 +46,6 @@ class MDSMonitor : public PaxosService {
 
   // my helpers
   void print_map(FSMap &m, int dbl=7);
-
-  class C_Updated : public Context {
-    MDSMonitor *mm;
-    MonOpRequestRef op;
-  public:
-    C_Updated(MDSMonitor *a, MonOpRequestRef c) :
-      mm(a), op(c) {}
-    void finish(int r) {
-      if (r >= 0)
-       mm->_updated(op);   // success
-      else if (r == -ECANCELED) {
-       mm->mon->no_reply(op);
-      } else {
-       mm->dispatch(op);        // try again
-      }
-    }
-  };
-
   void create_new_fs(FSMap &m, const std::string &name, int metadata_pool, int data_pool);
 
   version_t get_trim_to();