summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Zafman <david.zafman@inktank.com>2013-09-11 16:55:06 -0700
committerSamuel Just <sam.just@inktank.com>2013-10-01 16:18:48 -0700
commite0203c61a3f45fdd6d3d3ece26fef6152bdc036d (patch)
tree5027d8f39395af7860ec34aab08f4f7d72f8494f
parentc376708358cedb5561fbb43e9b9e622df3ea7a58 (diff)
downloadceph-e0203c61a3f45fdd6d3d3ece26fef6152bdc036d.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> (cherry picked from commit 139a714e13aa3c7f42091270b55dde8a17b3c4b8) Conflicts: src/osd/OSD.cc
-rw-r--r--src/osd/OSD.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index f081d9379bd..b67e406afbd 100644
--- a/src/osd/OSD.cc
+++ b/src/osd/OSD.cc
@@ -6644,7 +6644,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(g_conf->osd_recovery_max_active - recovery_ops_active,
+ int max = MIN(g_conf->osd_recovery_max_active - recovery_ops_active,
g_conf->osd_recovery_max_single_start);
if (max > 0) {
dout(10) << "do_recovery can start " << max << " (" << recovery_ops_active << "/" << g_conf->osd_recovery_max_active