From: Loic Dachary Date: Thu, 13 Aug 2015 11:47:24 +0000 (+0200) Subject: osd: trigger the cache agent after a promotion X-Git-Tag: v0.94.4~40^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5656eec0000e95ea790c796a9f572c7261163cfa;p=ceph.git osd: trigger the cache agent after a promotion When a proxy read happens, the object promotion is done in parallel. The agent_choose_mode function must be called to reconsider the situation to protect against the following scenario: * proxy read * agent_choose_mode finds no object exists and the agent goes idle * object promotion happens * the agent does not reconsider and eviction does not happen although it should http://tracker.ceph.com/issues/12673 Fixes: #12673 Signed-off-by: Loic Dachary (cherry picked from commit e1f58feb9b1d20b72f2eb2eefdea5982e0cddccd) --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 34575abb6c19..6b22c3a845a6 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6694,6 +6694,10 @@ void ReplicatedPG::finish_promote(int r, CopyResults *results, simple_repop_submit(repop); osd->logger->inc(l_osd_tier_promote); + + assert(agent_state); + if (agent_state->is_idle()) + agent_choose_mode(); } void ReplicatedPG::cancel_copy(CopyOpRef cop, bool requeue)