From e0203c61a3f45fdd6d3d3ece26fef6152bdc036d Mon Sep 17 00:00:00 2001 From: David Zafman Date: Wed, 11 Sep 2013 16:55:06 -0700 Subject: [PATCH] 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 --- src/osd/OSD.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5