From: Sage Weil Date: Sat, 27 Jan 2018 19:48:14 +0000 (-0600) Subject: osd/PGBackend: drop on_local_applied_async X-Git-Tag: v13.0.2~222^2~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=26e450753cbbc9d87bf36fb5b5c3b4f1ecf96c81;p=ceph.git osd/PGBackend: drop on_local_applied_async Unused! Signed-off-by: Sage Weil --- diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index c7b3b0406446..bac5ef4ca950 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -923,8 +923,7 @@ void ECBackend::handle_sub_write( pg_shard_t from, OpRequestRef msg, ECSubWrite &op, - const ZTracer::Trace &trace, - Context *on_local_applied_sync) + const ZTracer::Trace &trace) { if (msg) msg->mark_started(); @@ -964,10 +963,6 @@ void ECBackend::handle_sub_write( ec_impl->get_data_chunk_count()) op.t.set_fadvise_flag(CEPH_OSD_OP_FLAG_FADVISE_DONTNEED); - if (on_local_applied_sync) { - dout(10) << "Queueing onreadable_sync: " << on_local_applied_sync << dendl; - localt.register_on_applied_sync(on_local_applied_sync); - } localt.register_on_commit( get_parent()->bless_context( new SubWriteCommitted( @@ -1466,7 +1461,6 @@ void ECBackend::submit_transaction( const eversion_t &roll_forward_to, const vector &log_entries, boost::optional &hset_history, - Context *on_local_applied_sync, Context *on_all_applied, Context *on_all_commit, ceph_tid_t tid, @@ -1483,7 +1477,6 @@ void ECBackend::submit_transaction( op->roll_forward_to = std::max(roll_forward_to, committed_to); op->log_entries = log_entries; std::swap(op->updated_hit_set_history, hset_history); - op->on_local_applied_sync = on_local_applied_sync; op->on_all_applied = on_all_applied; op->on_all_commit = on_all_commit; op->tid = tid; @@ -1494,7 +1487,6 @@ void ECBackend::submit_transaction( dout(10) << __func__ << ": op " << *op << " starting" << dendl; start_rmw(op, std::move(t)); - dout(10) << "onreadable_sync: " << op->on_local_applied_sync << dendl; } void ECBackend::call_write_ordered(std::function &&cb) { @@ -1966,7 +1958,6 @@ bool ECBackend::try_reads_to_commit() op->remote_read.clear(); op->remote_read_result.clear(); - dout(10) << "onreadable_sync: " << op->on_local_applied_sync << dendl; ObjectStore::Transaction empty; bool should_write_local = false; ECSubWrite local_write_op; @@ -2022,13 +2013,11 @@ bool ECBackend::try_reads_to_commit() } } if (should_write_local) { - handle_sub_write( - get_parent()->whoami_shard(), - op->client_op, - local_write_op, - op->trace, - op->on_local_applied_sync); - op->on_local_applied_sync = 0; + handle_sub_write( + get_parent()->whoami_shard(), + op->client_op, + local_write_op, + op->trace); } for (auto i = op->on_write.begin(); diff --git a/src/osd/ECBackend.h b/src/osd/ECBackend.h index c0efe32f5150..1fccb5644a27 100644 --- a/src/osd/ECBackend.h +++ b/src/osd/ECBackend.h @@ -70,8 +70,7 @@ public: pg_shard_t from, OpRequestRef msg, ECSubWrite &op, - const ZTracer::Trace &trace, - Context *on_local_applied_sync = 0 + const ZTracer::Trace &trace ); void handle_sub_read( pg_shard_t from, @@ -110,7 +109,6 @@ public: const eversion_t &roll_forward_to, const vector &log_entries, boost::optional &hset_history, - Context *on_local_applied_sync, Context *on_all_applied, Context *on_all_commit, ceph_tid_t tid, @@ -504,11 +502,9 @@ public: ExtentCache::write_pin pin; /// Callbacks - Context *on_local_applied_sync = nullptr; Context *on_all_applied = nullptr; Context *on_all_commit = nullptr; ~Op() { - delete on_local_applied_sync; delete on_all_applied; delete on_all_commit; } diff --git a/src/osd/PGBackend.h b/src/osd/PGBackend.h index 7db632ed6443..158c358a714f 100644 --- a/src/osd/PGBackend.h +++ b/src/osd/PGBackend.h @@ -438,7 +438,6 @@ typedef ceph::shared_ptr OSDMapRef; const vector &log_entries, ///< [in] log entries for t /// [in] hitset history (if updated with this transaction) boost::optional &hset_history, - Context *on_local_applied_sync, ///< [in] called when applied locally Context *on_all_applied, ///< [in] called when all acked Context *on_all_commit, ///< [in] called when all commit ceph_tid_t tid, ///< [in] tid diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d33a1d0fd634..a22c255a186f 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10131,7 +10131,6 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx) min_last_complete_ondisk, ctx->log, ctx->updated_hset_history, - nullptr, on_all_applied, on_all_commit, repop->rep_tid, diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index 1111908ee340..2e14f1e51513 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -449,7 +449,6 @@ void ReplicatedBackend::submit_transaction( const eversion_t &roll_forward_to, const vector &_log_entries, boost::optional &hset_history, - Context *on_local_applied_sync, Context *on_all_acked, Context *on_all_commit, ceph_tid_t tid, @@ -517,7 +516,6 @@ void ReplicatedBackend::submit_transaction( true, op_t); - op_t.register_on_applied_sync(on_local_applied_sync); op_t.register_on_applied( parent->bless_context( new C_OSD_OnOpApplied(this, &op))); diff --git a/src/osd/ReplicatedBackend.h b/src/osd/ReplicatedBackend.h index f2a648793273..0beae0c9a7d2 100644 --- a/src/osd/ReplicatedBackend.h +++ b/src/osd/ReplicatedBackend.h @@ -365,7 +365,6 @@ public: const eversion_t &roll_forward_to, const vector &log_entries, boost::optional &hset_history, - Context *on_local_applied_sync, Context *on_all_applied, Context *on_all_commit, ceph_tid_t tid,