From: Samuel Just Date: Thu, 4 Jul 2024 03:48:50 +0000 (-0700) Subject: crimson/osd: convert remaining IOInterruptCondition users to specify epoch X-Git-Tag: v19.2.1~307^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dd92287b976a2a9767530daf6678aaf6287d441f;p=ceph.git crimson/osd: convert remaining IOInterruptCondition users to specify epoch Let's be explicit about this as allowing the epoch to be grabbed out of pg->get_osdmap_epoch() implicitely is going to be wrong fairly often. Signed-off-by: Samuel Just (cherry picked from commit eec5d0bfacdfd7b54e2342ff5e6de457e1b680d5) --- diff --git a/src/crimson/admin/pg_commands.cc b/src/crimson/admin/pg_commands.cc index c71bd429e78a..440c7a383ff7 100644 --- a/src/crimson/admin/pg_commands.cc +++ b/src/crimson/admin/pg_commands.cc @@ -174,7 +174,7 @@ public: return PG::interruptor::now(); }, [FNAME, pg](std::exception_ptr ep) { DEBUGDPP("interrupted with {}", *pg, ep); - }, pg).then([format] { + }, pg, pg->get_osdmap_epoch()).then([format] { std::unique_ptr f{ Formatter::create(format, "json-pretty", "json-pretty") }; diff --git a/src/crimson/osd/osd_operations/client_request.cc b/src/crimson/osd/osd_operations/client_request.cc index d78d05cf7087..6042fc88f0d5 100644 --- a/src/crimson/osd/osd_operations/client_request.cc +++ b/src/crimson/osd/osd_operations/client_request.cc @@ -222,7 +222,7 @@ seastar::future<> ClientRequest::with_pg_process( }, [FNAME, this, this_instance_id, pgref](std::exception_ptr eptr) { DEBUGDPP("{}.{}: interrupted due to {}", *pgref, *this, this_instance_id, eptr); - }, pgref).finally( + }, pgref, pgref->get_osdmap_epoch()).finally( [this, FNAME, opref=std::move(opref), pgref, this_instance_id, instance_handle=std::move(instance_handle), &ihref] { DEBUGDPP("{}.{}: exit", *pgref, *this, this_instance_id); diff --git a/src/crimson/osd/osd_operations/logmissing_request.cc b/src/crimson/osd/osd_operations/logmissing_request.cc index cc3448fb1ce2..8147c969260f 100644 --- a/src/crimson/osd/osd_operations/logmissing_request.cc +++ b/src/crimson/osd/osd_operations/logmissing_request.cc @@ -89,7 +89,7 @@ seastar::future<> LogMissingRequest::with_pg( }); }, [](std::exception_ptr) { return seastar::now(); - }, pg).finally([this, ref=std::move(ref)] { + }, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] { logger().debug("{}: exit", *this); handle.exit(); }); diff --git a/src/crimson/osd/osd_operations/logmissing_request_reply.cc b/src/crimson/osd/osd_operations/logmissing_request_reply.cc index 39b3debf10f5..fb122a95cd14 100644 --- a/src/crimson/osd/osd_operations/logmissing_request_reply.cc +++ b/src/crimson/osd/osd_operations/logmissing_request_reply.cc @@ -75,7 +75,7 @@ seastar::future<> LogMissingRequestReply::with_pg( }); }, [](std::exception_ptr) { return seastar::now(); - }, pg).finally([this, ref=std::move(ref)] { + }, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] { logger().debug("{}: exit", *this); handle.exit(); }); diff --git a/src/crimson/osd/osd_operations/recovery_subrequest.cc b/src/crimson/osd/osd_operations/recovery_subrequest.cc index e333e4b5c0af..f90bf9901de5 100644 --- a/src/crimson/osd/osd_operations/recovery_subrequest.cc +++ b/src/crimson/osd/osd_operations/recovery_subrequest.cc @@ -43,7 +43,7 @@ seastar::future<> RecoverySubRequest::with_pg( }); }, [](std::exception_ptr) { return seastar::now(); - }, pgref).finally([this, opref=std::move(opref), pgref] { + }, pgref, pgref->get_osdmap_epoch()).finally([this, opref=std::move(opref), pgref] { logger().debug("{}: exit", *this); track_event(); handle.exit(); diff --git a/src/crimson/osd/osd_operations/replicated_request.cc b/src/crimson/osd/osd_operations/replicated_request.cc index 30adde0445ad..5ca11e5dd15e 100644 --- a/src/crimson/osd/osd_operations/replicated_request.cc +++ b/src/crimson/osd/osd_operations/replicated_request.cc @@ -88,7 +88,7 @@ seastar::future<> RepRequest::with_pg( }); }, [](std::exception_ptr) { return seastar::now(); - }, pg).finally([this, ref=std::move(ref)] { + }, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] { logger().debug("{}: exit", *this); handle.exit(); }); diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index ad777c49d601..bcf8b14256c8 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -544,7 +544,7 @@ void PG::on_active_actmap() }, [this](std::exception_ptr eptr) { logger().debug("{}: snap trimming interrupted", *this); ceph_assert(!peering_state.state_test(PG_STATE_SNAPTRIM)); - }, pg_ref).finally([pg_ref, this] { + }, pg_ref, pg_ref->get_osdmap_epoch()).finally([pg_ref, this] { publish_stats_to_osd(); }); } else {