From: Sage Weil Date: Thu, 31 Jul 2014 16:13:11 +0000 (-0700) Subject: osd/ReplicatedPG: check agent_mode if agent is enabled but hit_sets aren't X-Git-Tag: v0.84~35^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5d1c76f641310f5f65600f70ae76945b2aa472d7;p=ceph.git osd/ReplicatedPG: check agent_mode if agent is enabled but hit_sets aren't 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 --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 4dae5d3fef2f..393e7089fc83 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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 &&