}
if (agent_state) {
- agent_choose_mode();
+ if (agent_choose_mode(false, op))
+ return;
}
if ((m->get_flags() & CEPH_OSD_FLAG_IGNORE_CACHE) == 0 &&
unlock();
}
-void ReplicatedPG::agent_choose_mode(bool restart)
+bool ReplicatedPG::agent_choose_mode(bool restart, OpRequestRef op)
{
+ bool requeued = false;
// Let delay play out
if (agent_state->delaying) {
dout(20) << __func__ << this << " delaying, ignored" << dendl;
- return;
+ return requeued;
}
uint64_t divisor = pool.info.get_pg_num_divisor(info.pgid.pgid);
<< dendl;
if (agent_state->evict_mode == TierAgentState::EVICT_MODE_FULL &&
is_active()) {
+ if (op)
+ requeue_op(op);
requeue_ops(waiting_for_active);
requeue_ops(waiting_for_cache_not_full);
+ requeued = true;
}
agent_state->evict_mode = evict_mode;
}
osd->agent_adjust_pg(this, old_effort, agent_state->evict_effort);
}
}
+ return requeued;
}
void ReplicatedPG::agent_estimate_atime_temp(const hobject_t& oid,
/// clear agent state
void agent_clear();
- void agent_choose_mode(bool restart = false); ///< choose (new) agent mode(s)
+ /// choose (new) agent mode(s), returns true if op is requeued
+ bool agent_choose_mode(bool restart = false, OpRequestRef op = OpRequestRef());
void agent_choose_mode_restart();
/// true if we can send an ondisk/commit for v