<< (agent_active ? " active" : " NOT ACTIVE")
<< dendl;
dout(20) << __func__ << " oids " << agent_oids << dendl;
- if (agent_ops >= g_conf->osd_agent_max_ops || top.empty() ||
- !agent_active) {
+ int max = g_conf->osd_agent_max_ops - agent_ops;
+ int agent_flush_quota = max;
+ if (!flush_mode_high_count)
+ agent_flush_quota = g_conf->osd_agent_max_low_ops - agent_ops;
+ if (agent_flush_quota <= 0 || top.empty() || !agent_active) {
agent_cond.Wait(agent_lock);
continue;
}
agent_valid_iterator = true;
}
PGRef pg = *agent_queue_pos;
- int max = g_conf->osd_agent_max_ops - agent_ops;
- int agent_flush_quota = max;
- if (!flush_mode_high_count)
- agent_flush_quota = g_conf->osd_agent_max_low_ops - agent_ops;
- dout(10) << "high_count " << flush_mode_high_count << " agent_ops " << agent_ops << " flush_quota " << agent_flush_quota << dendl;
+ dout(10) << "high_count " << flush_mode_high_count
+ << " agent_ops " << agent_ops
+ << " flush_quota " << agent_flush_quota << dendl;
agent_lock.Unlock();
if (!pg->agent_work(max, agent_flush_quota)) {
dout(10) << __func__ << " " << pg->get_pgid()