]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSD.cc: Use MIN() so that we don't exceed osd_recovery_max_active
authorDavid Zafman <david.zafman@inktank.com>
Wed, 11 Sep 2013 23:55:06 +0000 (16:55 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 1 Oct 2013 23:18:48 +0000 (16:18 -0700)
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

src/osd/OSD.cc

index f081d9379bd9297843bcc9c8d0e36b3c98c94aa4..b67e406afbd346f1c795a79d1d0fedab2265aeee 100644 (file)
@@ -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