return true;
}
+struct C_AgentEvictStartStop : public Context {
+ ReplicatedPGRef pg;
+ C_AgentEvictStartStop(ReplicatedPG *p) : pg(p) {
+ pg->osd->agent_start_evict_op();
+ }
+ void finish(int r) {
+ pg->osd->agent_finish_evict_op();
+ }
+};
+
bool ReplicatedPG::agent_maybe_evict(ObjectContextRef& obc)
{
const hobject_t& soid = obc->obs.oi.soid;
dout(10) << __func__ << " evicting " << obc->obs.oi << dendl;
RepGather *repop = simple_repop_create(obc);
OpContext *ctx = repop->ctx;
+ Context *on_evict = new C_AgentEvictStartStop(this);
+ ctx->on_finish = on_evict;
ctx->lock_to_release = OpContext::W_LOCK;
ctx->at_version = get_next_version();
assert(ctx->new_obs.exists);
boost::scoped_ptr<TierAgentState> agent_state;
friend struct C_AgentFlushStartStop;
+ friend struct C_AgentEvictStartStop;
friend struct C_HitSetFlushing;
void agent_setup(); ///< initialize agent state