diff options
author | Sage Weil <sage@inktank.com> | 2012-12-02 07:31:49 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-12-02 14:30:33 -0800 |
commit | 85574a36226611ccf0fb7591fd275a2bdcca2bad (patch) | |
tree | d0fc13d0e57bda3949e89a7a4b916108e67725c2 | |
parent | 528108485be7912069087822e5b7a1a2f1dd515e (diff) | |
download | ceph-85574a36226611ccf0fb7591fd275a2bdcca2bad.tar.gz |
os/JournalingObjectStore: applied_seq -> max_applied_seq
Rename applied_seq to max_applied_seq, since it is a bound; there may be
seq's < max_applied_seq that are not applied. This aligns the naming with
max_applying_seq.
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/os/JournalingObjectStore.cc | 14 | ||||
-rw-r--r-- | src/os/JournalingObjectStore.h | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/os/JournalingObjectStore.cc b/src/os/JournalingObjectStore.cc index 3f05fa0fb16..b1aee62eca8 100644 --- a/src/os/JournalingObjectStore.cc +++ b/src/os/JournalingObjectStore.cc @@ -142,7 +142,7 @@ void JournalingObjectStore::ApplyManager::op_apply_finish(uint64_t op) dout(10) << "op_apply_finish " << op << " open_ops " << open_ops << " -> " << (open_ops-1) << ", max_applying_seq " << max_applying_seq - << ", applied_seq " << applied_seq << " -> " << MAX(op, applied_seq) + << ", max_applied_seq " << max_applied_seq << " -> " << MAX(op, max_applied_seq) << dendl; if (--open_ops == 0) open_ops_cond.Signal(); @@ -150,8 +150,8 @@ void JournalingObjectStore::ApplyManager::op_apply_finish(uint64_t op) // there can be multiple applies in flight; track the max value we // note. note that we can't _read_ this value and learn anything // meaningful unless/until we've quiesced all in-flight applies. - if (op > applied_seq) - applied_seq = op; + if (op > max_applied_seq) + max_applied_seq = op; } uint64_t JournalingObjectStore::SubmitManager::op_submit_start() @@ -193,20 +193,20 @@ bool JournalingObjectStore::ApplyManager::commit_start() { Mutex::Locker l(apply_lock); dout(10) << "commit_start max_applying_seq " << max_applying_seq - << ", applied_seq " << applied_seq + << ", max_applied_seq " << max_applied_seq << dendl; blocked = true; while (open_ops > 0) { dout(10) << "commit_start blocked, waiting for " << open_ops << " open ops, " - << " max_applying_seq " << max_applying_seq << " applied_seq " << applied_seq << dendl; + << " max_applying_seq " << max_applying_seq << " max_applied_seq " << max_applied_seq << dendl; open_ops_cond.Wait(apply_lock); } assert(open_ops == 0); - assert(applied_seq == max_applying_seq); + assert(max_applied_seq == max_applying_seq); dout(10) << "commit_start blocked, all open_ops have completed" << dendl; { Mutex::Locker l(com_lock); - if (applied_seq == committed_seq) { + if (max_applied_seq == committed_seq) { dout(10) << "commit_start nothing to do" << dendl; blocked = false; if (!ops_apply_blocked.empty()) diff --git a/src/os/JournalingObjectStore.h b/src/os/JournalingObjectStore.h index 28665799a8c..ae74c32cd25 100644 --- a/src/os/JournalingObjectStore.h +++ b/src/os/JournalingObjectStore.h @@ -55,7 +55,7 @@ protected: int open_ops; Cond open_ops_cond; uint64_t max_applying_seq; - uint64_t applied_seq; + uint64_t max_applied_seq; Mutex com_lock; map<version_t, vector<Context*> > commit_waiters; @@ -70,7 +70,7 @@ protected: blocked(false), open_ops(0), max_applying_seq(0), - applied_seq(0), + max_applied_seq(0), com_lock("JOS::ApplyManager::com_lock", false, true, false, g_ceph_context), committing_seq(0), committed_seq(0) {} void add_waiter(uint64_t, Context*); @@ -99,7 +99,7 @@ protected: } { Mutex::Locker l(apply_lock); - max_applying_seq = applied_seq = fs_op_seq; + max_applying_seq = max_applied_seq = fs_op_seq; } } } apply_manager; |