]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: fix cache full -> not full requeueing when !active
authorSage Weil <sage@redhat.com>
Fri, 25 Jul 2014 21:43:48 +0000 (14:43 -0700)
committerSage Weil <sage@redhat.com>
Sat, 2 Aug 2014 00:06:43 +0000 (17:06 -0700)
We only want to do this if is_active().  Otherwise, the normal
requeueing code will do its thing, taking care to get the queue orders
correct.

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 36aaab9eee7ed41a46a4ac27376d630a29de5eb9)

src/osd/ReplicatedPG.cc

index 90ce4c1911aea7abade232ecbf81e09e034cc9ee..4e342e92e63223b9283b44307f6ce4b5b6419fd5 100644 (file)
@@ -11539,8 +11539,10 @@ void ReplicatedPG::agent_choose_mode(bool restart)
            << " -> "
            << TierAgentState::get_evict_mode_name(evict_mode)
            << dendl;
-    if (agent_state->evict_mode == TierAgentState::EVICT_MODE_FULL) {
+    if (agent_state->evict_mode == TierAgentState::EVICT_MODE_FULL &&
+       is_active()) {
       requeue_ops(waiting_for_cache_not_full);
+      requeue_ops(waiting_for_active);
     }
     agent_state->evict_mode = evict_mode;
   }