]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds/MDSRank: remove C_ExecAndReply helpers
authorSage Weil <sage@redhat.com>
Wed, 30 Oct 2019 12:26:13 +0000 (07:26 -0500)
committerSage Weil <sage@redhat.com>
Thu, 12 Dec 2019 19:31:26 +0000 (13:31 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mds/MDSRank.cc

index 5dc948b108978cbe15d5173f65c9726c1645c2a3..68ba408d0153b68da6b47f700f784ce4a7cf9a84 100644 (file)
@@ -2706,30 +2706,6 @@ public:
   }
 };
 
-class C_ExecAndReply : public C_MDS_Send_Command_Reply {
-public:
-  C_ExecAndReply(MDSRank *mds, const cref_t<MCommand> &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_,