From: Sage Weil Date: Wed, 7 Feb 2018 22:45:54 +0000 (-0600) Subject: osd/PrimaryLogPG: drop repop_all_applied() X-Git-Tag: v13.0.2~222^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b21dbb360102678769254f731122c546af454971;p=ceph.git osd/PrimaryLogPG: drop repop_all_applied() We don't need to eval_repop() since we know nothing has committed yet. Signed-off-by: Sage Weil --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 1deafbb6e46f..d6ff81b1b56b 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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 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 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( diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h index 435dfa93b2b4..a19f5a6c74f2 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -872,7 +872,6 @@ protected: // [primary|tail] xlist repop_queue; - friend class C_OSD_RepopApplied; friend class C_OSD_RepopCommit; void repop_all_applied(RepGather *repop); void repop_all_committed(RepGather *repop);