From 5f96edfb41c4b028732cf12da5ab44322e251b2a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 26 Oct 2017 16:23:41 -0500 Subject: [PATCH] osd/PG: fix recovery op leak due to recovery preemption This was fixed in master in a different patch, but are not yet ready to backport the bits there that came before this. For now, fix it specifically for luminous. We can either sort out the conflicts later or revert this and backport the master parts conflict-free. Signed-off-by: Sage Weil --- src/osd/PG.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 2ee82d7be40b4..3606d14fd2f69 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -6423,7 +6423,11 @@ PG::RecoveryState::Backfilling::react(const DeferBackfill &c) } } - pg->waiting_on_backfill.clear(); + + if (!pg->waiting_on_backfill.empty()) { + pg->waiting_on_backfill.clear(); + pg->finish_recovery_op(hobject_t::get_max()); + } pg->schedule_backfill_retry(c.delay); return transit(); @@ -6452,8 +6456,10 @@ PG::RecoveryState::Backfilling::react(const RemoteReservationRejected &) } } - pg->waiting_on_backfill.clear(); - pg->finish_recovery_op(hobject_t::get_max()); + if (!pg->waiting_on_backfill.empty()) { + pg->waiting_on_backfill.clear(); + pg->finish_recovery_op(hobject_t::get_max()); + } pg->schedule_backfill_retry(pg->cct->_conf->osd_recovery_retry_interval); return transit(); -- 2.39.5