]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: drop repop_all_applied()
authorSage Weil <sage@redhat.com>
Wed, 7 Feb 2018 22:45:54 +0000 (16:45 -0600)
committerSage Weil <sage@redhat.com>
Mon, 12 Feb 2018 20:35:27 +0000 (14:35 -0600)
We don't need to eval_repop() since we know nothing has committed yet.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h

index 1deafbb6e46f34caab126186ae64a2f894e366c1..d6ff81b1b56baff76c306d0afe1b45f56e572b67 100644 (file)
@@ -9888,29 +9888,6 @@ bool PrimaryLogPG::is_present_clone(hobject_t coid)
 // ========================================================================
 // rep op gather
 
-class C_OSD_RepopApplied : public Context {
-  PrimaryLogPGRef pg;
-  boost::intrusive_ptr<PrimaryLogPG::RepGather> repop;
-public:
-  C_OSD_RepopApplied(PrimaryLogPG *pg, PrimaryLogPG::RepGather *repop)
-  : pg(pg), repop(repop) {}
-  void finish(int) override {
-    pg->repop_all_applied(repop.get());
-  }
-};
-
-
-void PrimaryLogPG::repop_all_applied(RepGather *repop)
-{
-  dout(10) << __func__ << ": repop tid " << repop->rep_tid << " all applied "
-          << dendl;
-  assert(!repop->applies_with_commit);
-  repop->all_applied = true;
-  if (!repop->rep_aborted) {
-    eval_repop(repop);
-  }
-}
-
 class C_OSD_RepopCommit : public Context {
   PrimaryLogPGRef pg;
   boost::intrusive_ptr<PrimaryLogPG::RepGather> repop;
@@ -10090,7 +10067,6 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx)
   }
 
   Context *on_all_commit = new C_OSD_RepopCommit(this, repop);
-  Context *on_all_applied = new C_OSD_RepopApplied(this, repop);
   if (!(ctx->log.empty())) {
     assert(ctx->at_version >= projected_last_update);
     projected_last_update = ctx->at_version;
@@ -10107,11 +10083,12 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx)
     min_last_complete_ondisk,
     ctx->log,
     ctx->updated_hset_history,
-    on_all_applied,
+    nullptr,
     on_all_commit,
     repop->rep_tid,
     ctx->reqid,
     ctx->op);
+  repop->all_applied = true;
 }
 
 PrimaryLogPG::RepGather *PrimaryLogPG::new_repop(
index 435dfa93b2b43083d3869c076524b326754e5b29..a19f5a6c74f281112042475f4c3f4467020fbb34 100644 (file)
@@ -872,7 +872,6 @@ protected:
   // [primary|tail]
   xlist<RepGather*> repop_queue;
 
-  friend class C_OSD_RepopApplied;
   friend class C_OSD_RepopCommit;
   void repop_all_applied(RepGather *repop);
   void repop_all_committed(RepGather *repop);