void PG::split_ops(PG *child, unsigned split_bits) {
unsigned match = child->info.pgid.m_seed;
assert(waiting_for_all_missing.empty());
+ assert(waiting_for_cache_not_full.empty());
assert(waiting_for_missing_object.empty());
assert(waiting_for_degraded_object.empty());
assert(waiting_for_ack.empty());
// Ops waiting on backfill_pos to change
list<OpRequestRef> waiting_for_active;
+ list<OpRequestRef> waiting_for_cache_not_full;
list<OpRequestRef> waiting_for_all_missing;
map<hobject_t, list<OpRequestRef> > waiting_for_missing_object,
waiting_for_degraded_object,
do_cache_redirect(op, obc);
return true;
}
- // FIXME: do something clever with writes.
+ dout(20) << __func__ << " cache pool full, waiting" << dendl;
+ waiting_for_cache_not_full.push_back(op);
+ return true;
}
if (!must_promote && can_skip_promote(op, obc)) {
return false;
p->second.clear();
}
- if (is_primary())
+ if (is_primary()) {
+ requeue_ops(waiting_for_cache_not_full);
requeue_ops(waiting_for_all_missing);
- else
+ } else {
+ waiting_for_cache_not_full.clear();
waiting_for_all_missing.clear();
+ }
// this will requeue ops we were working on but didn't finish, and
// any dups
<< " -> "
<< TierAgentState::get_evict_mode_name(evict_mode)
<< dendl;
+ if (agent_state->evict_mode == TierAgentState::EVICT_MODE_FULL) {
+ requeue_ops(waiting_for_cache_not_full);
+ }
agent_state->evict_mode = evict_mode;
changed = true;
}