]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileJournal: a valid entry after invalid entry =/=> corrupt
authorSamuel Just <sam.just@inktank.com>
Mon, 22 Apr 2013 18:27:50 +0000 (11:27 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 22 Apr 2013 18:32:25 +0000 (11:32 -0700)
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 <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/os/FileJournal.cc

index 6e5f94c64e5460518bf11438c17926137c52ddca..1a3ce01d3906b121577458e6b37d139f09c12c69 100644 (file)
@@ -1677,39 +1677,6 @@ bool FileJournal::read_entry(
   }
 
   stringstream errss;
-  while (result == MAYBE_CORRUPT &&
-        (static_cast<uint64_t>(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 "