Commit 0c9975c1 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Make the ban lurker skip busy objects

If the ban lurker finds a busy object, skip the object and defer the
checking to a later pass.

No test case because it is very timing sensitive (but see the trac bug
report for a VTC-file that mostly triggers it on the 3.0 branch only)

Fixes: #1162
parent 116393f2
......@@ -878,6 +878,18 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass)
VTIM_sleep(cache_param->ban_lurker_sleep);
continue;
}
/*
* If the object is busy, we can't touch
* it. Defer it to a later run.
*/
if (oc->flags & OC_F_BUSY) {
oc->flags |= pass;
VTAILQ_REMOVE(&b->objcore, oc, ban_list);
VTAILQ_INSERT_TAIL(&b->objcore, oc, ban_list);
Lck_Unlock(&oh->mtx);
Lck_Unlock(&ban_mtx);
continue;
}
/*
* Grab a reference to the OC and we can let go of
* the BAN mutex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment