From 2af377925a874f97efd275fc44ae02103b93970d Mon Sep 17 00:00:00 2001 From: Michal Jarzabek Date: Thu, 12 May 2016 20:51:55 +0100 Subject: [PATCH] osd/OSD: move C_Tick and C_Tick_WithoutOSDLock Since above classes are implementation detail of OSD class move them to the .cc file. Signed-off-by: Michal Jarzabek --- src/osd/OSD.cc | 19 +++++++++++++++++++ src/osd/OSD.h | 21 +++------------------ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index ed1e4bd2e09..9b7e7be42b9 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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; diff --git a/src/osd/OSD.h b/src/osd/OSD.h index b68ca96973b..5c569fb4621 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -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;