From 039da62f3e86b8f5007108e9de405c9436b84610 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 13 Sep 2013 16:07:29 -0700 Subject: [PATCH] ReplicatedPG: don't proceed to backfill until recovering is empty Signed-off-by: Samuel Just --- src/osd/ReplicatedPG.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 350186af3e08d..8c1e8a30352fb 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -7534,7 +7534,8 @@ int ReplicatedPG::start_recovery_ops( } bool deferred_backfill = false; - if (state_test(PG_STATE_BACKFILL) && + if (recovering.empty() && + state_test(PG_STATE_BACKFILL) && backfill_target >= 0 && started < max && missing.num_missing() == 0 && !waiting_on_backfill) { @@ -7562,9 +7563,11 @@ int ReplicatedPG::start_recovery_ops( dout(10) << " started " << started << dendl; osd->logger->inc(l_osd_rop, started); - if (started || recovery_ops_active > 0 || deferred_backfill) + if (!recovering.empty() || + started || recovery_ops_active > 0 || deferred_backfill) return started; + assert(recovering.empty()); assert(recovery_ops_active == 0); int unfound = get_num_unfound(); -- 2.39.5