diff options
author | David Zafman <david.zafman@inktank.com> | 2013-09-11 16:55:06 -0700 |
---|---|---|
committer | David Zafman <david.zafman@inktank.com> | 2013-09-12 11:11:08 -0700 |
commit | 139a714e13aa3c7f42091270b55dde8a17b3c4b8 (patch) | |
tree | 499e57d49c8d51266e7ea455f3638d8c333caa4d | |
parent | 73e626ccea957a7ecca8ee872c6a6350cdcc7cf2 (diff) | |
download | ceph-139a714e13aa3c7f42091270b55dde8a17b3c4b8.tar.gz |
osd/OSD.cc: Use MIN() so that we don't exceed osd_recovery_max_active
Caused by 944f3b73531af791c90f0f061280160003545c63
Fixes: #6291
Backport: dumpling
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/OSD.cc | 2 |
1 files changed, 1 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 |