Prior to start journal commit, it always needs to wait the ongoing apply
operation to finish, not only needed during journal replay. Between
commit_start() and commit_started(), it always needs to prevent starting
apply, not only needed during journal replay.
Signed-off-by: Li Wang <li.wang@kylin-cloud.com>
{
Mutex::Locker l(apply_lock);
while (blocked) {
- // note: this only happens during journal replay
dout(10) << "op_apply_start blocked, waiting" << dendl;
blocked_cond.Wait(apply_lock);
}
--open_ops;
assert(open_ops >= 0);
- // signal a blocked commit_start (only needed during journal replay)
+ // signal a blocked commit_start
if (blocked) {
blocked_cond.Signal();
}