summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-09-13 16:07:29 -0700
committerSamuel Just <sam.just@inktank.com>2013-09-19 20:04:19 -0700
commit4fafa2bf42a6c5e1d4cc08261b8a33d9e254310e (patch)
tree83a8d26e73922fb8fb2348330d1e2dd79ca5a72a
parent5fcc0cbf74006d16eb88501e129a182f82bd4c0c (diff)
downloadceph-4fafa2bf42a6c5e1d4cc08261b8a33d9e254310e.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.cc7
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();