diff mbox

os/FileJournal: When dump journal, using correctly last-seq avoid misjudging joural corrupt.

Message ID 6AA21C22F0A5DA478922644AD2EC308C8953EE@SHSMSX101.ccr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ma, Jianpeng July 22, 2014, 12:29 a.m. UTC
In func FileJournal::dump, it always use seq=0 as last-seq and misjudge the journal corrupt.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
---
 src/os/FileJournal.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc
index 7eb7927..3307655 100644
--- a/src/os/FileJournal.cc
+++ b/src/os/FileJournal.cc
@@ -564,9 +564,9 @@  int FileJournal::dump(ostream& out)
   JSONFormatter f(true);

   f.open_array_section("journal");
+  uint64_t seq = 0;
   while (1) {
     bufferlist bl;
-    uint64_t seq = 0;
     uint64_t pos = read_pos;
     if (!read_entry(bl, seq)) {
       dout(3) << "journal_replay: end of journal, done." << dendl;