]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg: clear backfill_state when the PG goes clean 59456/head
authorXuehan Xu <xuxuehan@qianxin.com>
Tue, 27 Aug 2024 14:04:52 +0000 (22:04 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Tue, 27 Aug 2024 14:06:50 +0000 (22:06 +0800)
Fixes: https://tracker.ceph.com/issues/67731
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/osd/pg.cc
src/crimson/osd/pg_recovery.cc
src/crimson/osd/pg_recovery.h

index cdaa1e8378fc9b6a5d138975f5561f90991bd00a..1d1285d1fd008c296163de981ec937cf8c9bef32 100644 (file)
@@ -513,6 +513,7 @@ PG::do_delete_work(ceph::os::Transaction &t, ghobject_t _next)
 
 Context *PG::on_clean()
 {
+  recovery_handler->on_pg_clean();
   scrubber.on_primary_active_clean();
   return nullptr;
 }
index f4a7d8a63db9f4787578f07688085c7d1bb2b5b4..226b4dfccb275282c482239715f41fb261faeaf7 100644 (file)
@@ -603,9 +603,13 @@ bool PGRecovery::budget_available() const
   return true;
 }
 
-void PGRecovery::backfilled()
+void PGRecovery::on_pg_clean()
 {
   backfill_state.reset();
+}
+
+void PGRecovery::backfilled()
+{
   using LocalPeeringEvent = crimson::osd::LocalPeeringEvent;
   std::ignore = pg->get_shard_services().start_operation<LocalPeeringEvent>(
     static_cast<crimson::osd::PG*>(pg),
index f5b8632a3826372720f477a71394b9779b77e1e1..58743be25d6b3e6148751c55050e0ad8ea1571d4 100644 (file)
@@ -41,6 +41,7 @@ public:
   }
 
   seastar::future<> stop() { return seastar::now(); }
+  void on_pg_clean();
 private:
   PGRecoveryListener* pg;
   size_t start_primary_recovery_ops(