]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: call lower-level do_transactions() during journal replay
authorSage Weil <sage@newdream.net>
Wed, 1 Dec 2010 21:48:56 +0000 (13:48 -0800)
committerSage Weil <sage@newdream.net>
Wed, 1 Dec 2010 21:48:56 +0000 (13:48 -0800)
We used to call apply_transactions, which avoided rejournaling anything
because the journal wasn't writeable yet, but that uses all kinds of other
machinery that relies on threads and finishers and such that aren't
appropriate or necessary when we're just replaying journaled events.

Instead, call the lower-level do_transactions() directly.

Signed-off-by: Sage Weil <sage@newdream.net>
src/os/JournalingObjectStore.cc
src/os/JournalingObjectStore.h

index 6480c74104100a9f5fdbeab3c8a0e3af8abcd3de..60165a189cabedd1201640ca5c3cefeeeb14916d 100644 (file)
@@ -68,7 +68,8 @@ int JournalingObjectStore::journal_replay(uint64_t fs_op_seq)
       Transaction *t = new Transaction(p);
       tls.push_back(t);
     }
-    int r = apply_transactions(tls);
+    int r = do_transactions(tls, op_seq);
+    op_seq++;
     while (!tls.empty()) {
       delete tls.front(); 
       tls.pop_front();
index 6189a3fe1c184f68372b05e3ed972646c3802101..530215191498d7c457782c441f707fc8964ce40b 100644 (file)
@@ -53,6 +53,8 @@ protected:
   void op_journal_transactions(list<ObjectStore::Transaction*>& tls, uint64_t op, Context *onjournal);
   void _op_journal_transactions(list<ObjectStore::Transaction*>& tls, uint64_t op, Context *onjournal);
 
+  virtual int do_transactions(list<ObjectStore::Transaction*>& tls, uint64_t op_seq) = 0;
+
   bool commit_start();
   void commit_started();  // allow new ops (underlying fs should now be committing all prior ops)
   void commit_finish();