]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/JourningObjectStore: drop now-useless max_applying_seq
authorSage Weil <sage@inktank.com>
Fri, 7 Dec 2012 00:20:00 +0000 (16:20 -0800)
committerSage Weil <sage@inktank.com>
Sat, 8 Dec 2012 17:32:47 +0000 (09:32 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/os/JournalingObjectStore.cc
src/os/JournalingObjectStore.h

index 99d34f8bc2622f4f0354a9c2e0a74e5a2650f540..6413c70f1387925fbec94701aa6bfbf07d33457b 100644 (file)
@@ -109,11 +109,8 @@ int JournalingObjectStore::journal_replay(uint64_t fs_op_seq)
 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;
@@ -124,7 +121,6 @@ void JournalingObjectStore::ApplyManager::op_apply_finish(uint64_t 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;
@@ -175,13 +171,11 @@ bool JournalingObjectStore::ApplyManager::commit_start()
 
   {
     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);
@@ -192,7 +186,7 @@ bool JournalingObjectStore::ApplyManager::commit_start()
        goto out;
       }
 
-      committing_seq = max_applying_seq;
+      committing_seq = max_applied_seq;
 
       dout(10) << "commit_start committing " << committing_seq
               << ", still blocked" << dendl;
index 9443740437253e256ac369e704c78f8f7468279c..fea58e806c46292693b1b15fb404e2f0afd6882d 100644 (file)
@@ -53,7 +53,6 @@ protected:
     bool blocked;
     Cond blocked_cond;
     int open_ops;
-    uint64_t max_applying_seq;
     uint64_t max_applied_seq;
 
     Mutex com_lock;
@@ -67,7 +66,6 @@ protected:
       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) {}
@@ -97,7 +95,7 @@ protected:
       }
       {
        Mutex::Locker l(apply_lock);
-       max_applying_seq = max_applied_seq = fs_op_seq;
+       max_applied_seq = fs_op_seq;
       }
     }
   } apply_manager;