From: Xinze Chi Date: Fri, 16 Jan 2015 08:49:09 +0000 (+0000) Subject: osd: fix journal header.committed_up_to X-Git-Tag: v0.93~245^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3375%2Fhead;p=ceph.git osd: fix journal header.committed_up_to Signed-off-by: Xinze Chi --- diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index 759e96219e6..575a5b68ba2 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -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; } }