]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: check agent_mode if agent is enabled but hit_sets aren't
authorSage Weil <sage@redhat.com>
Thu, 31 Jul 2014 16:13:11 +0000 (09:13 -0700)
committerSage Weil <sage@redhat.com>
Thu, 31 Jul 2014 18:03:18 +0000 (11:03 -0700)
It is probably not a good idea to try to run the tiering agent without a
hit_set to inform its actions, but it is technically possible.  For
example, one could simply blindly evict when we reach the full point.
However, this doesn't work because the agent mode is guarded by a hit_set
check, even though agent_setup() is not.  Fix that.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/ReplicatedPG.cc

index 4dae5d3fef2faf82c79320d8ae857c20a6ea01e7..393e7089fc83bab2eac86737bd9a15e2c7cf386e 100644 (file)
@@ -1348,9 +1348,10 @@ void ReplicatedPG::do_op(OpRequestRef& op)
        hit_set_start_stamp + pool.info.hit_set_period <= m->get_recv_stamp()) {
       hit_set_persist();
     }
+  }
 
-    if (agent_state)
-      agent_choose_mode();
+  if (agent_state) {
+    agent_choose_mode();
   }
 
   if ((m->get_flags() & CEPH_OSD_FLAG_IGNORE_CACHE) == 0 &&