Skip to content

Commit b066013

Browse files
authored
Merge pull request ceph#59456 from xxhdx1985126/wip-67731
crimson/osd/pg: clear backfill_state when the PG goes clean Reviewed-by: Matan Breizman <[email protected]>
2 parents e35401e + 07a1a2f commit b066013

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
@@ -515,6 +515,7 @@ PG::do_delete_work(ceph::os::Transaction &t, ghobject_t _next)
515515

516516
Context *PG::on_clean()
517517
{
518+
recovery_handler->on_pg_clean();
518519
scrubber.on_primary_active_clean();
519520
return nullptr;
520521
}

src/crimson/osd/pg_recovery.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,13 @@ bool PGRecovery::budget_available() const
611611
return true;
612612
}
613613

614-
void PGRecovery::backfilled()
614+
void PGRecovery::on_pg_clean()
615615
{
616616
backfill_state.reset();
617+
}
618+
619+
void PGRecovery::backfilled()
620+
{
617621
using LocalPeeringEvent = crimson::osd::LocalPeeringEvent;
618622
std::ignore = pg->get_shard_services().start_operation<LocalPeeringEvent>(
619623
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
@@ -44,6 +44,7 @@ class PGRecovery : public crimson::osd::BackfillState::BackfillListener {
4444
}
4545

4646
seastar::future<> stop() { return seastar::now(); }
47+
void on_pg_clean();
4748
private:
4849
PGRecoveryListener* pg;
4950
size_t start_primary_recovery_ops(

0 commit comments

Comments
 (0)