From d6ab61a6c87968304039ed1a91aa6e5382ff5e57 Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Wed, 28 Jun 2023 09:07:26 +0000 Subject: [PATCH] crimson/osd/osd_operations: consistent naming to pipeline users Rename pp/bp to client_pp or peering_pp. Signed-off-by: Matan Breizman (cherry picked from commit 9f3dc8db7195b6a42499b46c7dbea872d30788b9) --- .../osd/osd_operations/background_recovery.cc | 4 ++-- .../osd/osd_operations/background_recovery.h | 2 +- .../osd/osd_operations/client_request.cc | 16 +++++++-------- .../osd/osd_operations/client_request.h | 2 +- .../osd_operations/internal_client_request.cc | 11 +++++----- .../osd_operations/internal_client_request.h | 2 +- .../osd/osd_operations/logmissing_request.cc | 2 +- .../osd/osd_operations/logmissing_request.h | 2 +- .../logmissing_request_reply.cc | 2 +- .../osd_operations/logmissing_request_reply.h | 2 +- .../osd/osd_operations/peering_event.cc | 6 +++--- .../osd/osd_operations/peering_event.h | 2 +- .../osd/osd_operations/replicated_request.cc | 4 ++-- .../osd/osd_operations/replicated_request.h | 2 +- .../osd/osd_operations/snaptrim_event.cc | 20 +++++++++---------- .../osd/osd_operations/snaptrim_event.h | 4 ++-- 16 files changed, 42 insertions(+), 41 deletions(-) diff --git a/src/crimson/osd/osd_operations/background_recovery.cc b/src/crimson/osd/osd_operations/background_recovery.cc index 41ad87a32bf..953ec9595da 100644 --- a/src/crimson/osd/osd_operations/background_recovery.cc +++ b/src/crimson/osd/osd_operations/background_recovery.cc @@ -172,7 +172,7 @@ PglogBasedRecovery::do_recovery() }); } -PGPeeringPipeline &BackfillRecovery::bp(PG &pg) +PGPeeringPipeline &BackfillRecovery::peering_pp(PG &pg) { return pg.peering_request_pg_pipeline; } @@ -193,7 +193,7 @@ BackfillRecovery::do_recovery() // with the backfill_pipeline we protect it from a second entry from // the implementation of BackfillListener. // additionally, this stage serves to synchronize with PeeringEvent. - bp(*pg).process + peering_pp(*pg).process ).then_interruptible([this] { pg->get_recovery_handler()->dispatch_backfill_event(std::move(evt)); return seastar::make_ready_future(false); diff --git a/src/crimson/osd/osd_operations/background_recovery.h b/src/crimson/osd/osd_operations/background_recovery.h index 4a1ea1900c6..17f2cd57a30 100644 --- a/src/crimson/osd/osd_operations/background_recovery.h +++ b/src/crimson/osd/osd_operations/background_recovery.h @@ -116,7 +116,7 @@ private: boost::intrusive_ptr evt; PipelineHandle handle; - static PGPeeringPipeline &bp(PG &pg); + static PGPeeringPipeline &peering_pp(PG &pg); interruptible_future do_recovery() override; }; diff --git a/src/crimson/osd/osd_operations/client_request.cc b/src/crimson/osd/osd_operations/client_request.cc index c46c419c7b9..9374fbde2cc 100644 --- a/src/crimson/osd/osd_operations/client_request.cc +++ b/src/crimson/osd/osd_operations/client_request.cc @@ -81,7 +81,7 @@ ConnectionPipeline &ClientRequest::get_connection_pipeline() return get_osd_priv(conn.get()).client_request_conn_pipeline; } -ClientRequest::PGPipeline &ClientRequest::pp(PG &pg) +ClientRequest::PGPipeline &ClientRequest::client_pp(PG &pg) { return pg.request_pg_pipeline; } @@ -118,7 +118,7 @@ seastar::future<> ClientRequest::with_pg_int( return interruptor::now(); }); } - return ihref.enter_stage(pp(pg).await_map, *this + return ihref.enter_stage(client_pp(pg).await_map, *this ).then_interruptible([this, this_instance_id, &pg, &ihref] { logger().debug("{}.{}: after await_map stage", *this, this_instance_id); return ihref.enter_blocker( @@ -126,7 +126,7 @@ seastar::future<> ClientRequest::with_pg_int( m->get_min_epoch(), nullptr); }).then_interruptible([this, this_instance_id, &pg, &ihref](auto map) { logger().debug("{}.{}: after wait_for_map", *this, this_instance_id); - return ihref.enter_stage(pp(pg).wait_for_active, *this); + return ihref.enter_stage(client_pp(pg).wait_for_active, *this); }).then_interruptible([this, this_instance_id, &pg, &ihref]() { logger().debug( "{}.{}: after wait_for_active stage", *this, this_instance_id); @@ -197,7 +197,7 @@ ClientRequest::interruptible_future<> ClientRequest::process_op(instance_handle_t &ihref, Ref &pg) { return ihref.enter_stage( - pp(*pg).recover_missing, + client_pp(*pg).recover_missing, *this ).then_interruptible( [this, pg]() mutable { @@ -219,7 +219,7 @@ ClientRequest::process_op(instance_handle_t &ihref, Ref &pg) reply->set_reply_versions(completed->version, completed->user_version); return conn->send(std::move(reply)); } else { - return ihref.enter_stage(pp(*pg).get_obc, *this + return ihref.enter_stage(client_pp(*pg).get_obc, *this ).then_interruptible( [this, pg, &ihref]() mutable -> PG::load_obc_iertr::future<> { logger().debug("{}: in get_obc stage", *this); @@ -229,7 +229,7 @@ ClientRequest::process_op(instance_handle_t &ihref, Ref &pg) [this, pg, &ihref](auto obc) mutable { logger().debug("{}: got obc {}", *this, obc->obs); return ihref.enter_stage( - pp(*pg).process, *this + client_pp(*pg).process, *this ).then_interruptible([this, pg, obc, &ihref]() mutable { return do_process(ihref, pg, obc); }); @@ -314,12 +314,12 @@ ClientRequest::do_process( return pg->do_osd_ops(m, conn, obc, op_info, snapc).safe_then_unpack_interruptible( [this, pg, &ihref](auto submitted, auto all_completed) mutable { return submitted.then_interruptible([this, pg, &ihref] { - return ihref.enter_stage(pp(*pg).wait_repop, *this); + return ihref.enter_stage(client_pp(*pg).wait_repop, *this); }).then_interruptible( [this, pg, all_completed=std::move(all_completed), &ihref]() mutable { return all_completed.safe_then_interruptible( [this, pg, &ihref](MURef reply) { - return ihref.enter_stage(pp(*pg).send_reply, *this + return ihref.enter_stage(client_pp(*pg).send_reply, *this ).then_interruptible( [this, reply=std::move(reply)]() mutable { logger().debug("{}: sending response", *this); diff --git a/src/crimson/osd/osd_operations/client_request.h b/src/crimson/osd/osd_operations/client_request.h index 4338ac41697..b2dce1e873e 100644 --- a/src/crimson/osd/osd_operations/client_request.h +++ b/src/crimson/osd/osd_operations/client_request.h @@ -244,7 +244,7 @@ private: Ref &pg); bool is_pg_op() const; - PGPipeline &pp(PG &pg); + PGPipeline &client_pp(PG &pg); template using interruptible_errorator = diff --git a/src/crimson/osd/osd_operations/internal_client_request.cc b/src/crimson/osd/osd_operations/internal_client_request.cc index e71804d88ea..1e9b842b2ec 100644 --- a/src/crimson/osd/osd_operations/internal_client_request.cc +++ b/src/crimson/osd/osd_operations/internal_client_request.cc @@ -43,7 +43,7 @@ void InternalClientRequest::dump_detail(Formatter *f) const { } -CommonPGPipeline& InternalClientRequest::pp() +CommonPGPipeline& InternalClientRequest::client_pp() { return pg->request_pg_pipeline; } @@ -56,7 +56,7 @@ seastar::future<> InternalClientRequest::start() logger().debug("{}: in repeat", *this); return interruptor::with_interruption([this]() mutable { return enter_stage( - pp().wait_for_active + client_pp().wait_for_active ).then_interruptible([this] { return with_blocking_event([this] (auto&& trigger) { @@ -64,12 +64,12 @@ seastar::future<> InternalClientRequest::start() }); }).then_interruptible([this] { return enter_stage( - pp().recover_missing); + client_pp().recover_missing); }).then_interruptible([this] { return do_recover_missing(pg, get_target_oid()); }).then_interruptible([this] { return enter_stage( - pp().get_obc); + client_pp().get_obc); }).then_interruptible([this] () -> PG::load_obc_iertr::future<> { logger().debug("{}: getting obc lock", *this); return seastar::do_with(create_osd_ops(), @@ -81,7 +81,8 @@ seastar::future<> InternalClientRequest::start() assert(ret == 0); return pg->with_locked_obc(get_target_oid(), op_info, [&osd_ops, this](auto obc) { - return enter_stage(pp().process).then_interruptible( + return enter_stage(client_pp().process + ).then_interruptible( [obc=std::move(obc), &osd_ops, this] { return pg->do_osd_ops( std::move(obc), diff --git a/src/crimson/osd/osd_operations/internal_client_request.h b/src/crimson/osd/osd_operations/internal_client_request.h index ca78905ea96..8eed12e050e 100644 --- a/src/crimson/osd/osd_operations/internal_client_request.h +++ b/src/crimson/osd/osd_operations/internal_client_request.h @@ -39,7 +39,7 @@ private: void print(std::ostream &) const final; void dump_detail(Formatter *f) const final; - CommonPGPipeline& pp(); + CommonPGPipeline& client_pp(); seastar::future<> do_process(); diff --git a/src/crimson/osd/osd_operations/logmissing_request.cc b/src/crimson/osd/osd_operations/logmissing_request.cc index 5dfb290f945..630869d5d88 100644 --- a/src/crimson/osd/osd_operations/logmissing_request.cc +++ b/src/crimson/osd/osd_operations/logmissing_request.cc @@ -49,7 +49,7 @@ ConnectionPipeline &LogMissingRequest::get_connection_pipeline() return get_osd_priv(conn.get()).replicated_request_conn_pipeline; } -ClientRequest::PGPipeline &LogMissingRequest::pp(PG &pg) +ClientRequest::PGPipeline &LogMissingRequest::client_pp(PG &pg) { return pg.request_pg_pipeline; } diff --git a/src/crimson/osd/osd_operations/logmissing_request.h b/src/crimson/osd/osd_operations/logmissing_request.h index 4ab87996f3a..ebfc520ede7 100644 --- a/src/crimson/osd/osd_operations/logmissing_request.h +++ b/src/crimson/osd/osd_operations/logmissing_request.h @@ -64,7 +64,7 @@ public: > tracking_events; private: - ClientRequest::PGPipeline &pp(PG &pg); + ClientRequest::PGPipeline &client_pp(PG &pg); crimson::net::ConnectionRef conn; // must be after `conn` to ensure the ConnectionPipeline's is alive diff --git a/src/crimson/osd/osd_operations/logmissing_request_reply.cc b/src/crimson/osd/osd_operations/logmissing_request_reply.cc index 95a968c1455..b4bf2938e05 100644 --- a/src/crimson/osd/osd_operations/logmissing_request_reply.cc +++ b/src/crimson/osd/osd_operations/logmissing_request_reply.cc @@ -49,7 +49,7 @@ ConnectionPipeline &LogMissingRequestReply::get_connection_pipeline() return get_osd_priv(conn.get()).replicated_request_conn_pipeline; } -ClientRequest::PGPipeline &LogMissingRequestReply::pp(PG &pg) +ClientRequest::PGPipeline &LogMissingRequestReply::client_pp(PG &pg) { return pg.request_pg_pipeline; } diff --git a/src/crimson/osd/osd_operations/logmissing_request_reply.h b/src/crimson/osd/osd_operations/logmissing_request_reply.h index cb39e9f6c2b..c89131fec1d 100644 --- a/src/crimson/osd/osd_operations/logmissing_request_reply.h +++ b/src/crimson/osd/osd_operations/logmissing_request_reply.h @@ -64,7 +64,7 @@ public: > tracking_events; private: - ClientRequest::PGPipeline &pp(PG &pg); + ClientRequest::PGPipeline &client_pp(PG &pg); crimson::net::ConnectionRef conn; // must be after `conn` to ensure the ConnectionPipeline's is alive diff --git a/src/crimson/osd/osd_operations/peering_event.cc b/src/crimson/osd/osd_operations/peering_event.cc index b323b4a817b..ea4662bd01e 100644 --- a/src/crimson/osd/osd_operations/peering_event.cc +++ b/src/crimson/osd/osd_operations/peering_event.cc @@ -54,7 +54,7 @@ void PeeringEvent::dump_detail(Formatter *f) const template -PGPeeringPipeline &PeeringEvent::pp(PG &pg) +PGPeeringPipeline &PeeringEvent::peering_pp(PG &pg) { return pg.peering_request_pg_pipeline; } @@ -73,7 +73,7 @@ seastar::future<> PeeringEvent::with_pg( using interruptor = typename T::interruptor; return interruptor::with_interruption([this, pg, &shard_services] { logger().debug("{}: pg present", *this); - return this->template enter_stage(pp(*pg).await_map + return this->template enter_stage(peering_pp(*pg).await_map ).then_interruptible([this, pg] { return this->template with_blocking_event< PG_OSDMapGate::OSDMapBlocker::BlockingEvent @@ -82,7 +82,7 @@ seastar::future<> PeeringEvent::with_pg( std::move(trigger), evt.get_epoch_sent()); }); }).then_interruptible([this, pg](auto) { - return this->template enter_stage(pp(*pg).process); + return this->template enter_stage(peering_pp(*pg).process); }).then_interruptible([this, pg, &shard_services] { return pg->do_peering_event(evt, ctx ).then_interruptible([this, pg, &shard_services] { diff --git a/src/crimson/osd/osd_operations/peering_event.h b/src/crimson/osd/osd_operations/peering_event.h index d9c9da58a17..e94caead199 100644 --- a/src/crimson/osd/osd_operations/peering_event.h +++ b/src/crimson/osd/osd_operations/peering_event.h @@ -51,7 +51,7 @@ public: static constexpr OperationTypeCode type = OperationTypeCode::peering_event; protected: - PGPeeringPipeline &pp(PG &pg); + PGPeeringPipeline &peering_pp(PG &pg); PeeringCtx ctx; pg_shard_t from; diff --git a/src/crimson/osd/osd_operations/replicated_request.cc b/src/crimson/osd/osd_operations/replicated_request.cc index f7d4fa68b2b..f0444a7c432 100644 --- a/src/crimson/osd/osd_operations/replicated_request.cc +++ b/src/crimson/osd/osd_operations/replicated_request.cc @@ -49,7 +49,7 @@ ConnectionPipeline &RepRequest::get_connection_pipeline() return get_osd_priv(conn.get()).replicated_request_conn_pipeline; } -ClientRequest::PGPipeline &RepRequest::pp(PG &pg) +ClientRequest::PGPipeline &RepRequest::client_pp(PG &pg) { return pg.request_pg_pipeline; } @@ -61,7 +61,7 @@ seastar::future<> RepRequest::with_pg( IRef ref = this; return interruptor::with_interruption([this, pg] { logger().debug("{}: pg present", *this); - return this->template enter_stage(pp(*pg).await_map + return this->template enter_stage(client_pp(*pg).await_map ).then_interruptible([this, pg] { return this->template with_blocking_event< PG_OSDMapGate::OSDMapBlocker::BlockingEvent diff --git a/src/crimson/osd/osd_operations/replicated_request.h b/src/crimson/osd/osd_operations/replicated_request.h index 78d97ecf439..c742888d939 100644 --- a/src/crimson/osd/osd_operations/replicated_request.h +++ b/src/crimson/osd/osd_operations/replicated_request.h @@ -66,7 +66,7 @@ public: > tracking_events; private: - ClientRequest::PGPipeline &pp(PG &pg); + ClientRequest::PGPipeline &client_pp(PG &pg); crimson::net::ConnectionRef conn; PipelineHandle handle; diff --git a/src/crimson/osd/osd_operations/snaptrim_event.cc b/src/crimson/osd/osd_operations/snaptrim_event.cc index 4a32b567cd4..e4a1b04df14 100644 --- a/src/crimson/osd/osd_operations/snaptrim_event.cc +++ b/src/crimson/osd/osd_operations/snaptrim_event.cc @@ -92,7 +92,7 @@ SnapTrimEvent::start() }); } -CommonPGPipeline& SnapTrimEvent::pp() +CommonPGPipeline& SnapTrimEvent::client_pp() { return pg->request_pg_pipeline; } @@ -103,7 +103,7 @@ SnapTrimEvent::with_pg( { return interruptor::with_interruption([&shard_services, this] { return enter_stage( - pp().wait_for_active + client_pp().wait_for_active ).then_interruptible([this] { return with_blocking_event([this] (auto&& trigger) { @@ -111,18 +111,18 @@ SnapTrimEvent::with_pg( }); }).then_interruptible([this] { return enter_stage( - pp().recover_missing); + client_pp().recover_missing); }).then_interruptible([] { //return do_recover_missing(pg, get_target_oid()); return seastar::now(); }).then_interruptible([this] { return enter_stage( - pp().get_obc); + client_pp().get_obc); }).then_interruptible([this] { return pg->snaptrim_mutex.lock(*this); }).then_interruptible([this] { return enter_stage( - pp().process); + client_pp().process); }).then_interruptible([&shard_services, this] { return interruptor::async([this] { std::vector to_trim; @@ -207,7 +207,7 @@ SnapTrimEvent::with_pg( } -CommonPGPipeline& SnapTrimObjSubEvent::pp() +CommonPGPipeline& SnapTrimObjSubEvent::client_pp() { return pg->request_pg_pipeline; } @@ -497,7 +497,7 @@ SnapTrimObjSubEvent::with_pg( ShardServices &shard_services, Ref _pg) { return enter_stage( - pp().wait_for_active + client_pp().wait_for_active ).then_interruptible([this] { return with_blocking_event([this] (auto&& trigger) { @@ -505,13 +505,13 @@ SnapTrimObjSubEvent::with_pg( }); }).then_interruptible([this] { return enter_stage( - pp().recover_missing); + client_pp().recover_missing); }).then_interruptible([] { //return do_recover_missing(pg, get_target_oid()); return seastar::now(); }).then_interruptible([this] { return enter_stage( - pp().get_obc); + client_pp().get_obc); }).then_interruptible([this] { logger().debug("{}: getting obc for {}", *this, coid); // end of commonality @@ -521,7 +521,7 @@ SnapTrimObjSubEvent::with_pg( [this](auto head_obc, auto clone_obc) { logger().debug("{}: got clone_obc={}", *this, clone_obc->get_oid()); return enter_stage( - pp().process + client_pp().process ).then_interruptible( [this,clone_obc=std::move(clone_obc), head_obc=std::move(head_obc)]() mutable { logger().debug("{}: processing clone_obc={}", *this, clone_obc->get_oid()); diff --git a/src/crimson/osd/osd_operations/snaptrim_event.h b/src/crimson/osd/osd_operations/snaptrim_event.h index 851b7b0f0b3..a3a970a04c7 100644 --- a/src/crimson/osd/osd_operations/snaptrim_event.h +++ b/src/crimson/osd/osd_operations/snaptrim_event.h @@ -57,7 +57,7 @@ public: ShardServices &shard_services, Ref pg); private: - CommonPGPipeline& pp(); + CommonPGPipeline& client_pp(); // bases on 998cb8c141bb89aafae298a9d5e130fbd78fe5f2 struct SubOpBlocker : crimson::BlockerT { @@ -143,7 +143,7 @@ public: remove_or_update_iertr::future<> with_pg( ShardServices &shard_services, Ref pg); - CommonPGPipeline& pp(); + CommonPGPipeline& client_pp(); private: object_stat_sum_t delta_stats; -- 2.39.5