}
}
-
- // Try to purge immediately if possible, else enqueue
const uint32_t ops_required = _calculate_ops_required(in, trunc);
- bool consumed = _consume(dn, trunc, ops_required);
+ // Try to purge immediately if there is nothing in the queue, otherwise
+ // we will go to the back of the queue (even if there is allowance available
+ // to run us immediately) in order to be fair to others.
+ bool consumed = false;
+ if (ready_for_purge.empty()) {
+ consumed = _consume(dn, trunc, ops_required);
+ }
+
if (consumed) {
dout(10) << __func__ << ": purging this dentry immediately: "
<< *dn << dendl;