osd: fix journal header.committed_up_to

Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
This commit is contained in:
Xinze Chi 2015-01-16 08:49:09 +00:00
parent 9542416890
commit 3ee69e3bc0

View 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;
}
}