]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filejournal: remove bogus check in read_entry
authorSage Weil <sage@newdream.net>
Mon, 5 Dec 2011 18:52:24 +0000 (10:52 -0800)
committerSage Weil <sage@newdream.net>
Mon, 5 Dec 2011 18:53:27 +0000 (10:53 -0800)
It is perfectly fine to read events that are older than the fs's seq from
the journal; open() will skip them when positioning the read pointer on
open.

Also, this code is nonsensical; it always failed the assertion.

Signed-off-by: Sage Weil <sage@newdream.net>
src/os/FileJournal.cc

index 29f9cdae795570d9b98fef03717c3509743585ba..19642ddeeb3d0fce145848725574e874a249b84a 100644 (file)
@@ -1168,12 +1168,6 @@ bool FileJournal::read_entry(bufferlist& bl, uint64_t& seq)
     return false;
   }
 
-  if (h->seq < last_committed_seq) {
-    dout(0) << "read_entry seq " << seq << " < last_committed_seq " << last_committed_seq << dendl;
-    assert(h->seq >= last_committed_seq);
-    return false;
-  }
-
   // ok!
   seq = h->seq;
   journalq.push_back(pair<uint64_t,off64_t>(h->seq, read_pos));