From a544bef2b8b7f04d6a2d5dcb5433f6a44bd9e96c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 30 Oct 2019 07:26:13 -0500 Subject: [PATCH] mds/MDSRank: remove C_ExecAndReply helpers Signed-off-by: Sage Weil --- src/mds/MDSRank.cc | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 5dc948b1089..68ba408d015 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -2706,30 +2706,6 @@ public: } }; -class C_ExecAndReply : public C_MDS_Send_Command_Reply { -public: - C_ExecAndReply(MDSRank *mds, const cref_t &m) - : C_MDS_Send_Command_Reply(mds, m), f(true) { - } - - void finish(int r) override { - std::stringstream ds; - std::stringstream ss; - if (r != 0) { - f.flush(ss); - } else { - f.flush(ds); - } - - send(r, ss.str(), ds); - } - - virtual void exec() = 0; - -protected: - JSONFormatter f; -}; - /** * This function drops the mds_lock, so don't do anything with * MDSRank after calling it (we could have gone into shutdown): just @@ -3505,12 +3481,6 @@ void MDSRank::bcast_mds_map() last_client_mdsmap_bcast = mdsmap->get_epoch(); } -Context *MDSRank::create_async_exec_context(C_ExecAndReply *ctx) { - return new C_OnFinisher(new LambdaContext([ctx](int) { - ctx->exec(); - }), finisher); -} - MDSRankDispatcher::MDSRankDispatcher( mds_rank_t whoami_, ceph::mutex &mds_lock_, -- 2.39.5