Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Reviewed-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Mingxin Liu <mingxinliu@ubuntukylin.com>
_dequeue(pg, old_priority);
}
+ /// note start of an async (evict) op
+ void agent_start_evict_op() {
+ Mutex::Locker l(agent_lock);
+ ++agent_ops;
+ }
+
+ /// note finish or cancellation of an async (evict) op
+ void agent_finish_evict_op() {
+ Mutex::Locker l(agent_lock);
+ assert(agent_ops > 0);
+ --agent_ops;
+ agent_cond.Signal();
+ }
+
/// note start of an async (flush) op
void agent_start_op(const hobject_t& oid) {
Mutex::Locker l(agent_lock);