]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "JounralingObjectStore: journal->committed_thru after replay"
authorSamuel Just <sam.just@inktank.com>
Mon, 18 Nov 2013 20:57:39 +0000 (12:57 -0800)
committerSamuel Just <sam.just@inktank.com>
Mon, 18 Nov 2013 20:58:27 +0000 (12:58 -0800)
committed_thru can race with the sync thread.

This reverts commit d8d27f13e11dcaefd3aa1c049b97c980283da575.
Reviewed-by: Greg Farnum <greg@inktank.com>
src/os/FileJournal.cc
src/os/JournalingObjectStore.cc

index 287f4b676717429a2310235d93594fb6ed6797c1..4a2af08dd4c0a2b03a9b42161ae08738808cc41b 100644 (file)
@@ -469,6 +469,7 @@ int FileJournal::open(uint64_t fs_op_seq)
 {
   dout(2) << "open " << fn << " fsid " << fsid << " fs_op_seq " << fs_op_seq << dendl;
 
+  last_committed_seq = fs_op_seq;
   uint64_t next_seq = fs_op_seq + 1;
 
   int err = _open(false);
@@ -527,11 +528,6 @@ int FileJournal::open(uint64_t fs_op_seq)
   // find next entry
   read_pos = header.start;
   uint64_t seq = header.start_seq;
-
-  // last_committed_seq is 1 before the start of the journal or
-  // 0 if the start is 0
-  last_committed_seq = seq > 0 ? seq - 1 : seq;
-
   while (1) {
     bufferlist bl;
     off64_t old_pos = read_pos;
index 4147ced8a3ab496e26666450d15712391d2cb183..e662580ac42bf3270a6c19d1cd50fab6bcbadade 100644 (file)
@@ -100,8 +100,6 @@ int JournalingObjectStore::journal_replay(uint64_t fs_op_seq)
   // done reading, make writeable.
   journal->make_writeable();
 
-  journal->committed_thru(fs_op_seq);
-
   return count;
 }