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 <stiopa@gmail.com>
This commit is contained in:
Michal Jarzabek 2016-05-12 20:51:55 +01:00
parent 31a0e0c4d8
commit 2af377925a
2 changed files with 22 additions and 18 deletions

View 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;

View 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;