]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: agent_work() fix next if finished early due to start_max
authorDavid Zafman <david.zafman@inktank.com>
Fri, 2 May 2014 01:54:30 +0000 (18:54 -0700)
committerDavid Zafman <david.zafman@inktank.com>
Tue, 6 May 2014 21:00:00 +0000 (14:00 -0700)
Backport: firefly

Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 9cf470cac8dd4d8f769e768f2de6b9eb67a3c3af)

src/osd/ReplicatedPG.cc

index 95b61a3112246da131e2b8981090659cd230f069..c92aeb350eec3fd46b99b6b3f8360232449e0a8d 100644 (file)
@@ -11090,8 +11090,12 @@ void ReplicatedPG::agent_work(int start_max)
     if (agent_state->evict_mode != TierAgentState::EVICT_MODE_IDLE &&
        agent_maybe_evict(obc))
       ++started;
-    if (started >= start_max)
+    if (started >= start_max) {
+      // If finishing early, set "next" to the next object
+      if (++p != ls.end())
+       next = *p;
       break;
+    }
   }
 
   if (++agent_state->hist_age > g_conf->osd_agent_hist_halflife) {