From 5cb85003a1d7800aeebe513415f31b5ae4557772 Mon Sep 17 00:00:00 2001 From: Michal Jarzabek Date: Sun, 4 Sep 2016 14:19:18 +0100 Subject: [PATCH] osd/PGBackend.h: move structs to .cc file Signed-off-by: Michal Jarzabek --- src/osd/PGBackend.h | 24 ------------------------ src/osd/ReplicatedBackend.cc | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/osd/PGBackend.h b/src/osd/PGBackend.h index 03a464990ae6..a082476afbf5 100644 --- a/src/osd/PGBackend.h +++ b/src/osd/PGBackend.h @@ -625,30 +625,6 @@ typedef ceph::shared_ptr OSDMapRef; ObjectStore::CollectionHandle &ch, ObjectStore *store, CephContext *cct); - }; - -struct PG_SendMessageOnConn: public Context { - PGBackend::Listener *pg; - Message *reply; - ConnectionRef conn; - PG_SendMessageOnConn( - PGBackend::Listener *pg, - Message *reply, - ConnectionRef conn) : pg(pg), reply(reply), conn(conn) {} - void finish(int) { - pg->send_message_osd_cluster(reply, conn.get()); - } -}; - -struct PG_RecoveryQueueAsync : public Context { - PGBackend::Listener *pg; - GenContext *c; - PG_RecoveryQueueAsync( - PGBackend::Listener *pg, - GenContext *c) : pg(pg), c(c) {} - void finish(int) { - pg->schedule_recovery_work(c); - } }; #endif diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index f5c983cb0efc..333a66cc550e 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -30,6 +30,34 @@ static ostream& _prefix(std::ostream *_dout, ReplicatedBackend *pgb) { return *_dout << pgb->get_parent()->gen_dbg_prefix(); } +namespace { +class PG_SendMessageOnConn: public Context { + PGBackend::Listener *pg; + Message *reply; + ConnectionRef conn; + public: + PG_SendMessageOnConn( + PGBackend::Listener *pg, + Message *reply, + ConnectionRef conn) : pg(pg), reply(reply), conn(conn) {} + void finish(int) { + pg->send_message_osd_cluster(reply, conn.get()); + } +}; + +class PG_RecoveryQueueAsync : public Context { + PGBackend::Listener *pg; + GenContext *c; + public: + PG_RecoveryQueueAsync( + PGBackend::Listener *pg, + GenContext *c) : pg(pg), c(c) {} + void finish(int) { + pg->schedule_recovery_work(c); + } +}; +} + struct ReplicatedBackend::C_OSD_RepModifyApply : public Context { ReplicatedBackend *pg; RepModifyRef rm; -- 2.47.3