uint64_t JournalingObjectStore::ApplyManager::op_apply_start(uint64_t op)
{
Mutex::Locker l(apply_lock);
- dout(10) << "op_apply_start " << op << " open_ops " << open_ops << " -> " << (open_ops+1)
- << ", max_applying_seq " << max_applying_seq << " -> " << MAX(op, max_applying_seq) << dendl;
+ dout(10) << "op_apply_start " << op << " open_ops " << open_ops << " -> " << (open_ops+1) << dendl;
assert(!blocked);
- if (op > max_applying_seq)
- max_applying_seq = op;
assert(op > committed_seq);
open_ops++;
return op;
Mutex::Locker l(apply_lock);
dout(10) << "op_apply_finish " << op << " open_ops " << open_ops
<< " -> " << (open_ops-1)
- << ", max_applying_seq " << max_applying_seq
<< ", max_applied_seq " << max_applied_seq << " -> " << MAX(op, max_applied_seq)
<< dendl;
--open_ops;
{
Mutex::Locker l(apply_lock);
- dout(10) << "commit_start max_applying_seq " << max_applying_seq
- << ", max_applied_seq " << max_applied_seq
+ dout(10) << "commit_start max_applied_seq " << max_applied_seq
<< ", open_ops " << open_ops
<< dendl;
blocked = true;
assert(open_ops == 0);
- assert(max_applied_seq == max_applying_seq);
dout(10) << "commit_start blocked, all open_ops have completed" << dendl;
{
Mutex::Locker l(com_lock);
goto out;
}
- committing_seq = max_applying_seq;
+ committing_seq = max_applied_seq;
dout(10) << "commit_start committing " << committing_seq
<< ", still blocked" << dendl;
bool blocked;
Cond blocked_cond;
int open_ops;
- uint64_t max_applying_seq;
uint64_t max_applied_seq;
Mutex com_lock;
apply_lock("JOS::ApplyManager::apply_lock", false, true, false, g_ceph_context),
blocked(false),
open_ops(0),
- max_applying_seq(0),
max_applied_seq(0),
com_lock("JOS::ApplyManager::com_lock", false, true, false, g_ceph_context),
committing_seq(0), committed_seq(0) {}
}
{
Mutex::Locker l(apply_lock);
- max_applying_seq = max_applied_seq = fs_op_seq;
+ max_applied_seq = fs_op_seq;
}
}
} apply_manager;