From: Sage Weil Date: Fri, 7 Jul 2017 02:39:00 +0000 (-0500) Subject: Merge pull request #16120 from yanghonggang/master X-Git-Tag: v12.1.1~155 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7a923dcf3a012cc5a4403445f2fd072638305208;p=ceph.git Merge pull request #16120 from yanghonggang/master os/filestore/FileJournal: FileJournal::open() close journal file before return error Reviewed-by: Kefu Chai --- 7a923dcf3a012cc5a4403445f2fd072638305208 diff --cc src/os/filestore/FileJournal.cc index 649e4460f22d,8eb053ef5e2e..0491559aee98 --- a/src/os/filestore/FileJournal.cc +++ b/src/os/filestore/FileJournal.cc @@@ -458,8 -465,17 +465,8 @@@ int FileJournal::open(uint64_t fs_op_se // find next entry read_pos = header.start; - uint64_t seq = header.start_seq; + 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; - if (last_committed_seq < fs_op_seq) { - dout(2) << "open advancing committed_seq " << last_committed_seq - << " to fs op_seq " << fs_op_seq << dendl; - last_committed_seq = fs_op_seq; - } - while (1) { bufferlist bl; off64_t old_pos = read_pos;