]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: convert remaining IOInterruptCondition users to specify epoch
authorSamuel Just <sjust@redhat.com>
Thu, 4 Jul 2024 03:48:50 +0000 (20:48 -0700)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 25 Jul 2024 07:53:41 +0000 (10:53 +0300)
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 <sjust@redhat.com>
(cherry picked from commit eec5d0bfacdfd7b54e2342ff5e6de457e1b680d5)

src/crimson/admin/pg_commands.cc
src/crimson/osd/osd_operations/client_request.cc
src/crimson/osd/osd_operations/logmissing_request.cc
src/crimson/osd/osd_operations/logmissing_request_reply.cc
src/crimson/osd/osd_operations/recovery_subrequest.cc
src/crimson/osd/osd_operations/replicated_request.cc
src/crimson/osd/pg.cc

index c71bd429e78a55b0fe3aed48b83a872681aaebaf..440c7a383ff74bcab2594278e4885c300b7c5f87 100644 (file)
@@ -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<Formatter> f{
        Formatter::create(format, "json-pretty", "json-pretty")
       };
index d78d05cf7087d01049f6b550f68f56c32f1ae60d..6042fc88f0d5d111d4fe4034e1294a0237afb5bc 100644 (file)
@@ -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);
index cc3448fb1ce2efecbb1fe0b9ecb3c9a011be0b14..8147c969260f73d44f19e41ff4c077cc6d6001ec 100644 (file)
@@ -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();
   });
index 39b3debf10f596daa2b6f08d3e54d7d143719250..fb122a95cd1421fa86bdbdae09be0dd96ad65142 100644 (file)
@@ -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();
   });
index e333e4b5c0afd3dcdb00631098a2fa44befd3376..f90bf9901de54d2c8e5148afa05b2d7cea6f8082 100644 (file)
@@ -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<CompletionEvent>();
     handle.exit();
index 30adde0445ad53a4dafa7713c69f951e92e44c35..5ca11e5dd15eeb4bc0afd9f7ac30fac493907e19 100644 (file)
@@ -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();
   });
index ad777c49d60118b66973abd10116d61196173294..bcf8b14256c866ca249fd67f871ced852c61109a 100644 (file)
@@ -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 {