diff options
author | David Zafman <david.zafman@inktank.com> | 2013-09-12 11:13:50 -0700 |
---|---|---|
committer | David Zafman <david.zafman@inktank.com> | 2013-09-12 11:13:50 -0700 |
commit | 388dd1e2012eacc1e91fa2fb6b8cb1fd71f1834c (patch) | |
tree | 25162716ee7bd69a29a04213fb8d85da7ac54cb0 | |
parent | a41aa9468f4c8dd92604c20e015904ac75f1e746 (diff) | |
parent | daf417f9ccc9181c549ad2d4a19b16b0c3caf85f (diff) | |
download | ceph-388dd1e2012eacc1e91fa2fb6b8cb1fd71f1834c.tar.gz |
Merge branch 'wip-6226'
-rw-r--r-- | src/osd/OSD.cc | 2 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.cc | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index faf82624825..20aef0301ec 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -6773,7 +6773,7 @@ void OSD::do_recovery(PG *pg, ThreadPool::TPHandle &handle) { // see how many we should try to start. note that this is a bit racy. recovery_wq.lock(); - int max = MAX(cct->_conf->osd_recovery_max_active - recovery_ops_active, + int max = MIN(cct->_conf->osd_recovery_max_active - recovery_ops_active, cct->_conf->osd_recovery_max_single_start); if (max > 0) { dout(10) << "do_recovery can start " << max << " (" << recovery_ops_active << "/" << cct->_conf->osd_recovery_max_active diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 2456d176834..3cd5a7ef865 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -7293,6 +7293,13 @@ int ReplicatedPG::start_recovery_ops( return started; } + if (needs_recovery()) { + // this shouldn't happen! + // We already checked num_missing() so we must have missing replicas + osd->clog.error() << info.pgid << " recovery ending with missing replicas\n"; + return started; + } + if (state_test(PG_STATE_RECOVERING)) { state_clear(PG_STATE_RECOVERING); if (needs_backfill()) { |