From: David Zafman Date: Wed, 11 Sep 2013 23:55:06 +0000 (-0700) Subject: osd/OSD.cc: Use MIN() so that we don't exceed osd_recovery_max_active X-Git-Tag: v0.67.4~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e0203c61a3f45fdd6d3d3ece26fef6152bdc036d;p=ceph.git 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 Reviewed-by: Samuel Just (cherry picked from commit 139a714e13aa3c7f42091270b55dde8a17b3c4b8) Conflicts: src/osd/OSD.cc --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index f081d9379bd92..b67e406afbd34 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