]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSD: move C_Tick and C_Tick_WithoutOSDLock
authorMichal Jarzabek <stiopa@gmail.com>
Thu, 12 May 2016 19:51:55 +0000 (20:51 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Thu, 12 May 2016 20:13:38 +0000 (21:13 +0100)
Since above classes are implementation detail of OSD class move them
to the .cc file.

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/osd/OSD.cc
src/osd/OSD.h

index ed1e4bd2e09e5a5e7cc8f96261ef540ffebb2b8d..9b7e7be42b929e65ad49db36d0d6488f5c1f0500 100644 (file)
@@ -1943,6 +1943,24 @@ public:
 
 };
 
+class OSD::C_Tick : public Context {
+  OSD *osd;
+  public:
+  explicit C_Tick(OSD *o) : osd(o) {}
+  void finish(int r) {
+    osd->tick();
+  }
+};
+
+class OSD::C_Tick_WithoutOSDLock : public Context {
+  OSD *osd;
+  public:
+  explicit C_Tick_WithoutOSDLock(OSD *o) : osd(o) {}
+  void finish(int r) {
+    osd->tick_without_osd_lock();
+  }
+};
+
 int OSD::enable_disable_fuse(bool stop)
 {
 #ifdef HAVE_LIBFUSE
@@ -2834,6 +2852,7 @@ int OSD::update_crush_location()
   return 0;
 }
 
+
 void OSD::write_superblock(ObjectStore::Transaction& t)
 {
   dout(10) << "write_superblock " << superblock << dendl;
index b68ca96973b9a61f50c27846f167799c364b94a7..5c569fb4621b4dff7ca971d57866111f701153b4 100644 (file)
@@ -1104,24 +1104,6 @@ protected:
   int whoami;
   std::string dev_path, journal_path;
 
-  class C_Tick : public Context {
-    OSD *osd;
-  public:
-    explicit C_Tick(OSD *o) : osd(o) {}
-    void finish(int r) {
-      osd->tick();
-    }
-  };
-
-  class C_Tick_WithoutOSDLock : public Context {
-    OSD *osd;
-  public:
-    explicit C_Tick_WithoutOSDLock(OSD *o) : osd(o) {}
-    void finish(int r) {
-      osd->tick_without_osd_lock();
-    }
-  };
-
   Cond dispatch_cond;
   bool dispatch_running;
 
@@ -1206,6 +1188,9 @@ public:
   
 
 private:
+  class C_Tick;
+  class C_Tick_WithoutOSDLock;
+
   // -- superblock --
   OSDSuperblock superblock;