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-19 12:50:46 -0700 |
commit | ac8a491da2648c53dd41578341bf5ea8d45d7466 (patch) | |
tree | 584cc11b96de2c4f7ccba3d2a3612eca89759040 | |
parent | 40a71188abdfb47e415abc59adb97d31a4f40a36 (diff) | |
download | ceph-ac8a491da2648c53dd41578341bf5ea8d45d7466.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 24acbf3ee56..dee579ed02a 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -7520,7 +7520,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) { @@ -7548,9 +7549,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(); |