mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
Merge pull request #4228 from athanatos/wip-11280
Wip 11280 Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
9d0dcc1f06
@ -1539,7 +1539,8 @@ void ReplicatedPG::do_op(OpRequestRef& op)
|
||||
}
|
||||
|
||||
if (agent_state) {
|
||||
agent_choose_mode();
|
||||
if (agent_choose_mode(false, op))
|
||||
return;
|
||||
}
|
||||
|
||||
if ((m->get_flags() & CEPH_OSD_FLAG_IGNORE_CACHE) == 0 &&
|
||||
@ -10858,12 +10859,13 @@ void ReplicatedPG::agent_choose_mode_restart()
|
||||
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);
|
||||
@ -11011,8 +11013,11 @@ void ReplicatedPG::agent_choose_mode(bool restart)
|
||||
<< dendl;
|
||||
if (agent_state->evict_mode == TierAgentState::EVICT_MODE_FULL &&
|
||||
is_active()) {
|
||||
requeue_ops(waiting_for_cache_not_full);
|
||||
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;
|
||||
}
|
||||
@ -11040,6 +11045,7 @@ void ReplicatedPG::agent_choose_mode(bool restart)
|
||||
osd->agent_adjust_pg(this, old_effort, agent_state->evict_effort);
|
||||
}
|
||||
}
|
||||
return requeued;
|
||||
}
|
||||
|
||||
void ReplicatedPG::agent_estimate_atime_temp(const hobject_t& oid,
|
||||
|
@ -917,7 +917,8 @@ protected:
|
||||
/// 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
|
||||
|
Loading…
Reference in New Issue
Block a user