From: Samuel Just Date: Mon, 22 Apr 2013 18:27:50 +0000 (-0700) Subject: FileJournal: a valid entry after invalid entry =/=> corrupt X-Git-Tag: v0.61~129 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8db9d0a274b5031d0fa1a3f9ec025a321b2463f6;p=ceph.git FileJournal: a valid entry after invalid entry =/=> corrupt Out of order journal entry writes using aio may cause entry n+2 to be written prior to n. This does not indicate corruption. Fixes: #4736 Signed-off-by: Samuel Just Reviewed-by: Greg Farnum --- diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index 6e5f94c64e54..1a3ce01d3906 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -1677,39 +1677,6 @@ bool FileJournal::read_entry( } stringstream errss; - while (result == MAYBE_CORRUPT && - (static_cast(pos - read_pos) < - g_conf->journal_max_corrupt_search)) { - errss << "Entry at pos " << pos << " possibly corrupt due to: (" - << ss.str() << ")" << std::endl; - ss.str(string()); - ss.clear(); - pos = next_pos; - result = do_read_entry( - pos, - &next_pos, - &bl, - &seq, - &ss); - } - - if (result == SUCCESS) { - if (seq >= next_seq) { - derr << errss.str() << dendl; - derr << "Entry at pos " << pos << " valid, there are missing sequence " - << "numbers prior to seq " << seq << dendl; - if (g_conf->journal_ignore_corruption) { - if (corrupt) - *corrupt = true; - return false; - } else { - assert(0); - } - } else { // We read a valid, but old entry, no problem - return false; - } - } - if (seq < header.committed_up_to) { derr << "Unable to read past sequence " << seq << " but header indicates the journal has committed up through "