diff options
author | Samuel Just <sam.just@inktank.com> | 2013-09-13 16:07:29 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-09-26 11:24:28 -0700 |
commit | 039da62f3e86b8f5007108e9de405c9436b84610 (patch) | |
tree | e3165d352698808f7e2ca41e7f58378579fdae66 | |
parent | 02e5c1fca7787f266098e7e05f1dd9ffa9a78797 (diff) | |
download | ceph-039da62f3e86b8f5007108e9de405c9436b84610.tar.gz |
ReplicatedPG: don't proceed to backfill until recovering is empty
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/ReplicatedPG.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 350186af3e0..8c1e8a30352 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(); |