diff options
author | Samuel Just <sam.just@inktank.com> | 2013-04-22 11:27:50 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-04-22 11:32:25 -0700 |
commit | 8db9d0a274b5031d0fa1a3f9ec025a321b2463f6 (patch) | |
tree | 275adc5bd18646fe50784f894ff8346a40b29361 | |
parent | 9b953aa4100eca5de2319b3c17c54bc2f6b03064 (diff) | |
download | ceph-8db9d0a274b5031d0fa1a3f9ec025a321b2463f6.tar.gz |
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 <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | src/os/FileJournal.cc | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index 6e5f94c64e5..1a3ce01d390 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<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 " |