]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix journal header.committed_up_to 3375/head
authorXinze Chi <xmdxcxz@gmail.com>
Fri, 16 Jan 2015 08:49:09 +0000 (08:49 +0000)
committerXinze Chi <xmdxcxz@gmail.com>
Fri, 16 Jan 2015 08:49:09 +0000 (08:49 +0000)
Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
src/os/FileJournal.cc

index 759e96219e69d518279603164e01617de9175780..575a5b68ba24fb061eddc445f859fd963ed18159 100644 (file)
@@ -509,6 +509,8 @@ int FileJournal::open(uint64_t fs_op_seq)
   // looks like a valid header.
   write_pos = 0;  // not writeable yet
 
+  journaled_seq = header.committed_up_to;
+
   // find next entry
   read_pos = header.start;
   uint64_t seq = header.start_seq;
@@ -1723,6 +1725,8 @@ bool FileJournal::read_entry(
     } else {
       read_pos = next_pos;
       next_seq = seq;
+      if (seq > journaled_seq)
+        journaled_seq = seq;
       return true;
     }
   }