From 2c980d1384f2cf328d77755ab314864b2dbd0553 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 7 May 2009 13:56:14 -0700 Subject: [PATCH] osd: fix bug in recovery ops accounting Adjust osd global counter too! --- src/osd/OSD.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 11149fc7ef092..8548f02dde2ee 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3265,7 +3265,9 @@ void OSD::start_recovery_op(PG *pg, int count) dout(10) << "start_recovery_op " << *pg << " count " << count << " (" << recovery_ops_active << "/" << g_conf.osd_recovery_max_active << " rops)" << dendl; + assert(recovery_ops_active >= 0); assert(pg->recovery_ops_active >= 0); + recovery_ops_active += count; pg->recovery_ops_active += count; recovery_wq.unlock(); } -- 2.39.5