From ac055b224aab20f07af02b32b5f2e1d9b0b5f80e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 7 Feb 2018 17:03:13 -0600 Subject: [PATCH] osd/PGBackend: remove on_applied() from interface PrimaryLogPG calls it synchronously, on its own, after submit_transaction. That means the backends no longer need to track it or call back to it. Signed-off-by: Sage Weil --- src/osd/ECBackend.cc | 1 - src/osd/PrimaryLogPG.cc | 1 + src/osd/PrimaryLogPG.h | 4 +--- src/osd/ReplicatedBackend.cc | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index 299676ac375a4..1b65ac3568ff1 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -929,7 +929,6 @@ void ECBackend::handle_sub_write( tls.push_back(std::move(op.t)); tls.push_back(std::move(localt)); get_parent()->queue_transactions(tls, msg); - parent->op_applied(op.at_version); } void ECBackend::handle_sub_read( diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 09bfafc3fbdc5..6b62ae3f98478 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10027,6 +10027,7 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx) repop->rep_tid, ctx->reqid, ctx->op); + op_applied(ctx->at_version); } PrimaryLogPG::RepGather *PrimaryLogPG::new_repop( diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h index 52bdfe9a7ec33..0cdbc3a40a269 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -414,9 +414,7 @@ public: append_log(logv, trim_to, roll_forward_to, t, transaction_applied); } - struct C_OSD_OnApplied; - void op_applied( - const eversion_t &applied_version) override; + void op_applied(const eversion_t &applied_version); // remove me bool should_send_op( pg_shard_t peer, diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index 2d79b61d1d353..5138627ffd707 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -518,7 +518,6 @@ void ReplicatedBackend::op_applied( } op->waiting_for_applied.erase(get_parent()->whoami_shard()); - parent->op_applied(op->v); if (op->waiting_for_applied.empty()) { op->on_applied->complete(0); @@ -1148,7 +1147,6 @@ void ReplicatedBackend::repop_applied(RepModifyRef rm) rm->ackerosd, ack, get_osdmap()->get_epoch()); } - parent->op_applied(version); } void ReplicatedBackend::repop_commit(RepModifyRef rm) -- 2.39.5