Skip to content

Commit 07a1a2f

Browse files
committed
crimson/osd/pg: clear backfill_state when the PG goes clean
Fixes: https://tracker.ceph.com/issues/67731 Signed-off-by: Xuehan Xu <[email protected]>
1 parent 418b53c commit 07a1a2f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/crimson/osd/pg.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ PG::do_delete_work(ceph::os::Transaction &t, ghobject_t _next)
513513

514514
Context *PG::on_clean()
515515
{
516+
recovery_handler->on_pg_clean();
516517
scrubber.on_primary_active_clean();
517518
return nullptr;
518519
}

src/crimson/osd/pg_recovery.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,13 @@ bool PGRecovery::budget_available() const
603603
return true;
604604
}
605605

606-
void PGRecovery::backfilled()
606+
void PGRecovery::on_pg_clean()
607607
{
608608
backfill_state.reset();
609+
}
610+
611+
void PGRecovery::backfilled()
612+
{
609613
using LocalPeeringEvent = crimson::osd::LocalPeeringEvent;
610614
std::ignore = pg->get_shard_services().start_operation<LocalPeeringEvent>(
611615
static_cast<crimson::osd::PG*>(pg),

src/crimson/osd/pg_recovery.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class PGRecovery : public crimson::osd::BackfillState::BackfillListener {
4141
}
4242

4343
seastar::future<> stop() { return seastar::now(); }
44+
void on_pg_clean();
4445
private:
4546
PGRecoveryListener* pg;
4647
size_t start_primary_recovery_ops(

0 commit comments

Comments
 (0)