From: Michal Jarzabek Date: Sun, 4 Sep 2016 13:19:18 +0000 (+0100) Subject: osd/PGBackend.h: move structs to .cc file X-Git-Tag: v11.0.1~148^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5cb85003a1d7800aeebe513415f31b5ae4557772;p=ceph.git osd/PGBackend.h: move structs to .cc file Signed-off-by: Michal Jarzabek --- 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;